SPRUJ17H March 2022 – October 2024 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
(FREQ = 192 MHz)
Program LIN_UART GCD register with the value of 0x000 in-order to switch to a new desired frequency, MSS_RCM.LINx_UARTx_CLK_DIV_VAL.CLKDIV = 0x000
Poll for the CURRDIVR field of corresponding status register to reflect its new frequency change, MSS_RCM.LINx_UARTx_CLK_STATUS.CURRDIVIDER = 0x00
Update the LIN_UART GCM register with the value of 0x333 to select PLL_PER_CLKOUT1 as its source, MSS_RCM.LINx_UARTx_CLK_SRC_SEL.CLKSRCSEL = 0x333
Poll for the CLKINUSE field of corresponding status register to reflect its new frequency change, MSS_RCM.LINx_UARTx_CLK_STATUS.CLKINUSE = 0x08
(FREQ = 160 MHz)
Program LIN_UART GCD register with the value of 0x000 in-order to switch to a new desired frequency, MSS_RCM.LINx_UARTx_CLK_DIV_VAL.CLKDIV = 0x000
Poll for the CURRDIVR field of corresponding status register to reflect its new frequency change, MSS_RCM.LINx_UARTx_CLK_STATUS.CURRDIVIDER = 0x00
Update the LIN_UART GCM register with the value of 0x777 to select PLL_PER_CLKOUT0 as its source, MSS_RCM.LINx_UARTx_CLK_SRC_SEL.CLKSRCSEL = 0x777
Poll for the CLKINUSE field of corresponding status register to reflect its new frequency change, MSS_RCM.LINx_UARTx_CLK_STATUS.CLKINUSE = 0x80
For LIN, Baud rate = 20 Kbps then functional clock = 48MHz
Program SCI_LIN_PSL field of BRSR register of the corresponding LIN instance with calculated value of 0x95 to attain the required baud rate, MSS_LINx.BRSR.SCI_LIN_PSL = 0x95
Baud rate relationship with LIN functional clock frequency,
Baud rate = fLIN / [16 * (P + 1 + M/16)]
For UART, Baud rate = 12 Mbps then functional clock = 192MHz,
Baud rate = 10 Mbps then functional clock = 160 MHz
Program CLOCK_LSB field of DLL register of the corresponding UART instance with calculated value of 0x1 to attain the required baud rate, MSS_UARTx.DLL.CLOCK_LSB = 0x1
Program CLOCK_MSB field of DLH register of the corresponding UART instance with calculated value of 0x0 to attain the required baud rate, MSS_UARTx.DLH.CLOCK_MSB = 0x0
Baud rate relationship with LIN functional clock frequency,
Baud rate = fUART / [16 * DIV]