FlexIO as UART under Linux

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FlexIO as UART under Linux

ソリューションへジャンプ
1,123件の閲覧回数
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,063件の閲覧回数
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,064件の閲覧回数
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,090件の閲覧回数
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 件の賞賛
返信