iMX7d GPIO toggle frequency - M4 slower than A7

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

iMX7d GPIO toggle frequency - M4 slower than A7

Jump to solution
1,018 Views
jsm09a
Contributor I

On an iMX7D, using Linux /dev/mem and mmap, I am able to achieve a maximum GPIO toggle rate of 10 Mhz from the (master) A7 core running at 1GHz (i.e. each GPIO transition requires ~ 50 ns).  However, when using direct (ASM) access from the Cortex-M4 (running at 238 MHz), the maximum achievable toggle rate drops to ~ 3.3 Mhz - the actual STR instruction writing the bit toggle to the GPIO4 data register requires a full 150 ns to complete (as measured by SYST_CVR reads before and after).

 

I have enabled Cortex-M4 LMEM caching and programmed the Cortex-M4 MPU to treat the GPIO4 memory space as NON-SHAREABLE, DEVICE MEMORY without any improvement in the toggle rate.  Is there any way to improve the GPIO access speed from the Cortex-M4 core , or is this a fundamental limitation of the architecture ?

 

Thanks, Scott.

PS - apologies for the duplicate post - couldn't find a way to move to existing post to i.MX Community threads.

Labels (1)
Tags (1)
1 Solution
793 Views
art
NXP Employee
NXP Employee

Q. Is there any way to improve the GPIO access speed from the Cortex-M4 core, or is this a fundamental limitation of the architecture ?

A. Unfortunately, no, there is no way to improve the access rate of the M4 core. And, yes, you are right, this is the fundamental limitation of the architecture.


Have a great day,
Artur

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

View solution in original post

1 Reply
794 Views
art
NXP Employee
NXP Employee

Q. Is there any way to improve the GPIO access speed from the Cortex-M4 core, or is this a fundamental limitation of the architecture ?

A. Unfortunately, no, there is no way to improve the access rate of the M4 core. And, yes, you are right, this is the fundamental limitation of the architecture.


Have a great day,
Artur

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