How to reconfigure a S32K144 UART?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to reconfigure a S32K144 UART?

2,086 次查看
klau
Contributor II

Hi Dear reader(s),

Is there a way to reconfigure a UART during run-time in firmware?

For example, run UART at 9600 baud for some time, then switch to 115200 baud without doing a hardware reset.

Thanks,
Kevin

0 项奖励
回复
3 回复数

1,939 次查看
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Kevin,


It is possible to reconfigure the UART during run-time. With the help of the lpuart driver provided within the SDK is really easy. You just need to call the function LPUART_DRV_Deinit() and the initialize again the module with the new baud rate that you want to configure. If you have the interrupts enabled, then you need to disable the UART interrupt too.


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复

1,939 次查看
klau
Contributor II

Hi Victor,

Thank you for your reply!!

I am not using any SDK. Could I do this without any SDK?

Thanks,

Kevin

On Thu, Jul 4, 2019 at 4:27 PM victorjimenez <admin@community.nxp.com>

0 项奖励
回复

1,939 次查看
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Kevin,

Yes, it would be possible to achieve this without the SDK. However, you will have to make the bare-metal implementation of the function LPUART_DRV_Deinit since we don't provide it.

Best Regards,

Victor

0 项奖励
回复