Hi
Im working with the LPUART module at 115200 bauds, but in an specific moment i need to change it to 57600 bauds. Then i have to return it to 115200 bauds.
How can i do it.
I have initialized it with processor expert at 115200 bauds.
Thanks
José
Hi Jose
// Change from 115.2k to 57.6k
LPUARTx_BAUD = ((LPUARTx_BAUD & ~LPUART_BAUD_SBR) | ((LPUARTx_BAUD & LPUART_BAUD_SBR) * 2));
// Change from 57.6k to 115.2k
LPUARTx_BAUD = ((LPUARTx_BAUD & ~LPUART_BAUD_SBR) | ((LPUARTx_BAUD & LPUART_BAUD_SBR) / 2));
x is LPUART channel
LPUART_BAUD_SBR is 0x1fff
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
The LPUART supports dual clock domains allowing for wake up MyWawaVisit from stop modes and baudrate programming independent of the peripheral clock mywawavisit.
One way to do this is directly writing to the UART clock prescaler register from your application.
Or: set the baud rate to 'list of values' (I'm not having a KL27Z, but I'm doing that with the KL25Z):
Then use SetBaudRateMode:
Hi Erich, thanks for answering
I searched in processor expert the AsynchroSerial component, but i cant find it to kl27Z.
I also looked at the LPUART configuration in processor expert and cannot add more baud rates to the list.
Do you know what could be the solution?
Thanks
Can you change the drop box of the 'Runtime settings type' to 'list of values'? Then you should be able to add more rates.