GPIO Low Performance

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,618件の閲覧回数
mauro_chimenti
Contributor I

I'm trying to understand why the GPIO performance on all IMX-RT processors are so low with the standard gpio.

Even a simple toggle GPIO code on a RT1176 like the one below reaches 6.6Mhz.

Writing on the GPIO interface creates 80 blocking wait states, even slower compared with rt1021.

what am I doing wrong?

I know there are  fast GPIO types, but why the standard ones are so slow?

with the rt1021 i have about a 18Mhz signal about three times faster

 

 

while (1)
{

if (g_pinSet)
  {
   EXAMPLE_LED_GPIO->DR_SET= (1UL << EXAMPLE_LED_GPIO_PIN);
   g_pinSet = false;
  }
  else
  {
   EXAMPLE_LED_GPIO->DR_CLEAR= (1UL << EXAMPLE_LED_GPIO_PIN);
  g_pinSet = true;
  }
}
}

0 件の賞賛
返信
1 解決策
1,588件の閲覧回数
RaRo
NXP TechSupport
NXP TechSupport

Hello @mauro_chimenti,

As you point out the normal GPIO speed is low, the speed of GPIOs will depend on which GPIO are you using. This is nothing to do with you doing something wrong.

As you mention you could increase the speed of the GPIO port, by selecting the CM7 fast GPIO. IMXRT1170 Reference Manual says: "This GPIO instance contains a mux that selects between normal GPIO or CM7 fast GPIO. See IOMUXC_GPR_GPR42-43 for more details."

RaulRomero_0-1680212017524.png

[Table 11-1. Muxing Options. Chapter 11 External Signals and Pin Multiplexing]

Depends of the GPIO you are going to use the GPR to modify, in this case we are talking about the iled_blinky_cm7 example, which uses the GPIO_AD_04. In this case the GPR to modify is the GPR42:

RaulRomero_1-1680212017549.png

[Chapter 12 IOMUX Controller (IOMUXC). Section 12.4.4.43 GPR42 General Purpose Register (GPR42)]

If you want faster speeds on your GPIOs, it might be good use this functionality. Please look at the following community post relating this situation: RT1060 Normal GPIO vs Fast GPIO - NXP Community.

Best regards, Raul.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,589件の閲覧回数
RaRo
NXP TechSupport
NXP TechSupport

Hello @mauro_chimenti,

As you point out the normal GPIO speed is low, the speed of GPIOs will depend on which GPIO are you using. This is nothing to do with you doing something wrong.

As you mention you could increase the speed of the GPIO port, by selecting the CM7 fast GPIO. IMXRT1170 Reference Manual says: "This GPIO instance contains a mux that selects between normal GPIO or CM7 fast GPIO. See IOMUXC_GPR_GPR42-43 for more details."

RaulRomero_0-1680212017524.png

[Table 11-1. Muxing Options. Chapter 11 External Signals and Pin Multiplexing]

Depends of the GPIO you are going to use the GPR to modify, in this case we are talking about the iled_blinky_cm7 example, which uses the GPIO_AD_04. In this case the GPR to modify is the GPR42:

RaulRomero_1-1680212017549.png

[Chapter 12 IOMUX Controller (IOMUXC). Section 12.4.4.43 GPR42 General Purpose Register (GPR42)]

If you want faster speeds on your GPIOs, it might be good use this functionality. Please look at the following community post relating this situation: RT1060 Normal GPIO vs Fast GPIO - NXP Community.

Best regards, Raul.

0 件の賞賛
返信