GPIO Read/Write Latency on Cortex-M7 core on i.MX 8M Nano

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

GPIO Read/Write Latency on Cortex-M7 core on i.MX 8M Nano

跳至解决方案
1,387 次查看
CodyGray
Contributor I

I want to use the Cortex-M7 core of an i.MX 8M Nano to control an ADC. The Cortex-M7 will be running "bare metal" (i.e., no operating system), so there are no interrupts or multi-tasking that will affect performance in a non-deterministic way.

My question is, what are the read and write latencies for the GPIO pins on the Cortex-M7 core when running "bare metal" on an i.MX 8M Nano?

I have previously implemented a similar design on the Cortex-M4 core of an i.MX 6SoloX, also in a bare-metal environment. However, I have noticed that the GPIO access times are extremely long. The latency to read or write a GPIO pin is very high. This significantly reduces the throughput and therefore reduces the maximum sampling rate that I can achieve.

On the other side, I have implemented the same design on a TI AM64x Sitara chip, where the PRU core was running "bare-metal" and handling the GPIO reads and writes. The PRU core on the TI chip gives me high-speed, deterministic access to the GPIO pins. The latency is only around 3 cycles.

How does the Cortex-M7 core on the i.MX 8M Nano compare? In order to decide if this CPU will work for my design, I need to know what the latency is. I would prefer to use the i.MX 8M Nano, as it is smaller than the TI Sitara chips, but if it has too high of a latency on GPIO access like the i.MX 6SoloX, then it will not work for me.

I cannot find the GPIO access times or latency documented in the data sheet or reference manual for the i.MX 8M Nano.

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,354 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

There is no test data related to M7, but on top of iMX8MM, the maximum GPIO toggling speed in the M4 baremetal program is 3.5Mhz. where the M4 core speed is 400Mhz, the IPG clock is 666666666666 Hz, the AHB clock is 13333333333 Hz, and the AXI clock is 3333333333333 Hz.



Best Regards,
Zhiming

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,331 次查看
CodyGray
Contributor I

Thank you for your answer! This is very helpful.

Do you happen to know how this compares to the GPIO toggling timing for the M33 core on the i.MX 93? What about for the M4 on the i.MX 6SoloX? Are they all essentially equivalent?

Is there any equivalent to the "fast" GPIO mode on the i.MX RT series? (The i.MX RT series doesn't work for me because I need a core that can run Linux.)

Thanks,
Cody

0 项奖励
回复
1,301 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

The GPIO toggling on i.MX93 baremetal is 6.67MHz with RGPIO.


Best Regards,
Zhiming

0 项奖励
回复
1,355 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

There is no test data related to M7, but on top of iMX8MM, the maximum GPIO toggling speed in the M4 baremetal program is 3.5Mhz. where the M4 core speed is 400Mhz, the IPG clock is 666666666666 Hz, the AHB clock is 13333333333 Hz, and the AXI clock is 3333333333333 Hz.



Best Regards,
Zhiming

0 项奖励
回复