Why do the USDHC examples use a GPIO interrupt to detect card insertion/removal and not the USDHC controllers insert/removal interrupt?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Why do the USDHC examples use a GPIO interrupt to detect card insertion/removal and not the USDHC controllers insert/removal interrupt?

961件の閲覧回数
mjbcswitzerland
Specialist V

Hi All

Is there a reason why the USDHC examples don't use the USDHC controller's own insertion/removal interrupt but instead use a general purpose port interrupt?

I note that when I try to use the USDHC's own it reflects the (non-debounced) insertion state but it doesn't update the insertion/removal flags. Is there such a problem that caused the example developer to abandon the method and fall back on a GPIO (nothing found in the erratas though)?

Regards

Mark

[uTasker project developer for Kinetis and i.MX RT]

ラベル(2)
0 件の賞賛
返信
2 返答(返信)

876件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Mark:

Which soc you are using?  From my test result, on RT1050, the usdhc doesn't support level detect, but support edge detect only.

Regards

Daniel

0 件の賞賛
返信

876件の閲覧回数
mjbcswitzerland
Specialist V

Hi Daniel

I checked i.MX RT 1020 and i.MX RT 1060 and in both cases the example code used GPIO inputs to detect the SD card (but I expect all examples will be the same).
In the meantime I implemented the USDHC internal card detection/removal successfully: https://www.utasker.com/iMX/RT1020.html which has worked very reliably (initially I had a clocking issue that was stopping it working, even if the present state flag was following it correctly).

A potential benefit of the GPIO interrupt method is that the USDHC controller can be gated off to save some power but I haven't measured whether it actually is better or not.

Regards

Mark

[uTasker project developer for Kinetis and i.MX RT]