RT1060 Normal GPIO vs Fast GPIO

cancel
Showing results for 
Search instead for 
Did you mean: 

RT1060 Normal GPIO vs Fast GPIO

RT1060 Normal GPIO vs Fast GPIO

The i.MXRT1060 provides the tightly coupled GPIO, enable to be accessed with high frequency.

pastedImage_2.png

RT1060 provides two set of GPIOs registers to control pads output. GPIO1 to GPIO3 is general GPIO, and GPIO6 to GPIO8 is tightly GPIO, but they share the same pad, that means the gpio pin can select from GPIO1/2/3 to GPIO6/7/8.

The registers IOMUXC_GPR_GPR26, IOMUXC_GPR_GPR27, and IOMUXC_GPR_GPR28 are for GPIO selection.

pastedImage_6.png

To select the gpio pin between GPIO1/2/3 or GPIO6/7/8 you can use MCUXpresso Config Tools. For example, if you select pin G10 you can select either GPIOI_IO11 for normal GPIO or GPIO6_IO11 for fast GPIO. 

pastedImage_8.png

I made an example based on the SDK v2.7.0 to compare the speed of Normal GPIO and Fast GPIO. For this, I used pin G10 (GPIOI_IO11 and GPIO6_IO11).

Firstly, I used the normal GPIO pin (GPIOI_IO11). I will toggle the pin by writing directly to the GPIO_DR register. Notice that you can access this pin through J22 pin 3 in the evaluation board, so you can measure the performance of the pin. Here are the results:

pastedImage_16.png

With the normal GPIO pin, we reach a period of 160ns when writing directly to the GPIO_DR register. Now, if we change to the fast GPIO and use the same instructions we have the following results.

pastedImage_18.png

As you can see when using the fast GPIO pin, the period of the signal it's almost one-third of the period when using a normal GPIO.

Now, The A1 silicon of the RT1060 has a new GPIO toggle feature. If we toggle the pin with the new register DR_TOGGLE instead of the GPIO_DR we will get better performance with both pins, normal GPIO and fast. Here are the results of normal GPIO with the DR_TOGGLE register.

pastedImage_21.png

As you can see when using the register DR_TOGGLE along with the normal GPIO pin we get a period of around 53 ns while when writing to the GPIO_DR register we got 160 ns. When using the register DR_TOGGLE and the fast GPIO we will get the best performance of the pin. Results are shown below.

pastedImage_1.png

Many thanks to jorge_a_vazquez for his valuable help with this document.

Hope this helps!

Best regards,

Victor.

Labels (1)
Comments

Dear Victor Jimenez 員工 ,

   How to enable Fast GPIO ? THANKS A LOT !!

Hello Ellen Lin

You need to select a GPIO pin of GPIO6, GPIO7 or GPIO8. If you followed the steps mentioned above you shouldn't face any problems to activate the fast GPIO. 

Best Regards, 

Victor 

Version history
Revision #:
1 of 1
Last update:
‎03-21-2019 04:37 PM
Updated by: