High speed GPIO1 on a MIMXRT-1020-EVK

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

High speed GPIO1 on a MIMXRT-1020-EVK

593 Views
k2vcv
Contributor I

I'm trying to get a high speed GPIO1 from my mimxrt-1020-evk & the top speed is only about 7.8Mhz / 128 nano sec. Is there any way to increase the timing speed? I'm using very short assembly code to the GPIO1 port...

Labels (1)
0 Kudos
3 Replies

528 Views
mjbcswitzerland
Specialist V

Hi

I am sorry that I didn't reply earlier but I have in the meantime repeated my original test on the 106x but on the 1021 - and have also found the same restriction on the 1021 (seeing that the 102x an 106x are clocked with the same speeds I assumed the slow GPIO would be identical).

I can confirm the 7.8MHz togging rate which is slower than the rate that same test achieves on the 106x.

Unfortunately I don't know what is limiting this since I use the same clock speeds. However I tried over-clocking the IPG clock root and see the following effects:
IPG 125MHz (maximum specified speed) gives 7.8MHz toggle speed
IPG 166MHz (1.3x overclocked) gives 10.4MHz toggle speed
IPG 250MHz (2x overclocked) gives 13.9MHz toggle speed

Therefore the rate is proportional to the IPG clock root speed but why it is slower that on the 106x when both are operated with the same IPG speed is a question that possibly only the chip designers will be able to explain.

"NXP claims I can go up to 20 MHz on the GPIO1"
Where do you find this? I didn't find a specific value.

Regards

Mark

 

 

0 Kudos

587 Views
mjbcswitzerland
Specialist V

Hi

If you have the clocks set optimally and use the GPIO toggle register you can get about 20MHz toggle speed on the i.MX RT 1021.

For higher speeds (up to around 150MHz toggle speed) you need to use the high speed GPIOs as available in the i.MX RT 106x.

Full details at https://www.youtube.com/watch?v=nLInUIboLR0&list=PLWKlVb_MqDQEOCnsNOJO8gd3jDCwiyKKe&index=14

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1020.html

0 Kudos

545 Views
k2vcv
Contributor I

I still have the same problem. I'm NOT looking to go to above 16 Mhz with this port. In my reply's I have shown my assembly code and clock settings but only get a maximum of 7.8 Mhz. Is this normal or please show me what I'm doing wrong. If you can send me a code example and clock setting of what I have to do I'd appreciate it. Again, NXP claims I can go up to 20 Mhz on the GPIO1 port but how do I get there? I believe my code (shown below) is the fastest way to toggle the register. Please send me an example of simple code and clock settings of how to get to no more than 20 Mhz but at least 16 Mhz.

Here is the assembly code I'm using in MCUXpressoIDE:
 
// GPIO1 J17-7 TEST --- CAN ONLY GET 128 nano sec speed!!!
 void speedtest(){
       asm(
"mov  r3,#0x808C\n\t"
"movt r3,#0x401b\n\t"
"movt r5,#0x0000\n\t"
"mov r5,#0x4000\n\t"
"again:"
"str r5,[r3]\n\t"
"  b again");
  }

 

Gene

0 Kudos