FlexIO as UART under Linux

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

FlexIO as UART under Linux

跳至解决方案
1,144 次查看
AndreasE
Contributor I


Dear all,

I need some clarification on FlexIO on i.MX93 and would like to see if my understanding is correct.

Our intention was to use FlexIO as a UART to get an extra UART on the A55 cores running Linux.
The first step, setting up the IOMUX in the devicetree, would be quite simple. But then you would still need a driver. But is there one yet?
Even in the linux-imx repo there is only an imx-flexio base driver and some i2c driver.

Also, it would not make much sense to develop such a flexio uart driver for Linux, because there is still too much UART stuff to be done in software?

  • The reference manual says "FLEXIO does not support automatic insertion of parity bits".
  • The i.MX Linux release notes say (in connection with flexio-i2c): "FlexIO has precise timing requirements. Using FlexIO on non real-time ROS may cause timing problems. It is not recommended for use on non real-time ROS".

Am I right that the FlexIO stuff is more for the M33 core and MCU world?
Or is there a way to get a full-featured UART using FlexIO on Linux?

Regards,
Andreas

0 项奖励
回复
1 解答
1,084 次查看
AndreasE
Contributor I

Just in case anyone is wondering the same thing and is looking for a more detailed answer than the one above.
AN14110 gives many hints

4 Conclusion

FlexIO can be emulated as the I2C master in different operating systems. However, it is not recommended to use FlexIO I2C in a Linux environment directly. Some check mechanisms should be applied to make sure the read or write operation is executed correctly in the Linux environment. Linux is not an RTOS, which means it cannot guarantee the interrupt latency or interrupt responding time. Linux may generate big interrupt latency while FlexIO IP can only tolerate small interrupt latency.

In a BareMetal or RTOS environment, such as Zephyr, FlexIO can work normally as expected.

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,085 次查看
AndreasE
Contributor I

Just in case anyone is wondering the same thing and is looking for a more detailed answer than the one above.
AN14110 gives many hints

4 Conclusion

FlexIO can be emulated as the I2C master in different operating systems. However, it is not recommended to use FlexIO I2C in a Linux environment directly. Some check mechanisms should be applied to make sure the read or write operation is executed correctly in the Linux environment. Linux is not an RTOS, which means it cannot guarantee the interrupt latency or interrupt responding time. Linux may generate big interrupt latency while FlexIO IP can only tolerate small interrupt latency.

In a BareMetal or RTOS environment, such as Zephyr, FlexIO can work normally as expected.

 

0 项奖励
回复
1,111 次查看
joanxie
NXP TechSupport
NXP TechSupport

we suggest customer to use FlexIO as uart with M core, not under linux, the application below is useful for you

https://www.nxp.com.cn/docs/en/application-note/AN12772.pdf

0 项奖励
回复