FlexIO as UART under Linux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FlexIO as UART under Linux

Jump to solution
1,147 Views
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 Kudos
Reply
1 Solution
1,087 Views
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.

 

View solution in original post

0 Kudos
Reply
2 Replies
1,088 Views
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 Kudos
Reply
1,114 Views
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 Kudos
Reply