Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(PeriphDrivers): Set default osr value #1164

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Libraries/PeriphDrivers/Source/UART/uart_ai87.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ int MXC_UART_SetFrequency(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clo
return E_BAD_PARAM;
}

// Default OSR
// Setting LPUART Over-Sampling Rate in MXC_UART_RevB_SetFrequency function overwrites
// the sampling rate set below for the ERTCO.
uart->osr = 5;

unsigned int input_clock_freq = 0;
switch (clock) {
case MXC_UART_APB_CLK:
Expand Down
3 changes: 3 additions & 0 deletions Libraries/PeriphDrivers/Source/UART/uart_me12.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ int MXC_UART_SetFrequency(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clo
return E_BAD_PARAM;
}

// Default OSR
uart->osr = 5;

switch (clock) {
case MXC_UART_APB_CLK:
clock_freq = SystemCoreClock / 2;
Expand Down
3 changes: 3 additions & 0 deletions Libraries/PeriphDrivers/Source/UART/uart_me30.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ int MXC_UART_SetFrequency(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clo
return E_BAD_PARAM;
}

// Default OSR
uart->osr = 5;

switch (clock) {
case MXC_UART_APB_CLK:
clock_freq = PeripheralClock;
Expand Down
3 changes: 3 additions & 0 deletions Libraries/PeriphDrivers/Source/UART/uart_me55.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ int MXC_UART_SetFrequency(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clo
return E_BAD_PARAM;
}

// Default OSR
uart->osr = 5;

switch (clock) {
case MXC_UART_APB_CLK:
clock_freq = SystemCoreClock / 2;
Expand Down
Loading