Skip to content

Commit

Permalink
fix(PeriphDrivers): Set default osr value (#1164)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Perkins <michael.perkins@analog.com>
  • Loading branch information
perkinsmg authored Sep 10, 2024
1 parent 4664d3b commit 11dfd2e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
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

0 comments on commit 11dfd2e

Please sign in to comment.