Cannot find the control of stop supplying sdclk in Evkmimxrt1060 wifi_setup example

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

Cannot find the control of stop supplying sdclk in Evkmimxrt1060 wifi_setup example

2,842 Views
little123
Contributor I

sdk 2.13.0 ->evkmimxrt060->wifi_examples

->wifi_setup

I’m studying the above example design and find that there is no control of sdclk in the function SDIO_SwitchVoltage of the file fsl _sdio.c. According to the SDIO 3.0 protocol, the SD host should stop supplying sdclk at least 5ms after the card drive the cmd and data line to low level. There is no function stops sdclk before voltage switch(in the line 180 of the fsl_sdio.c). And in the line 192 of the fsl_sdio.c, the function SDMMCHOST_ForceClockOn makes the clock off at last. This makes me confused and I search the datasheet of RT 1062,I can’t find the register to disable sdclk but FRC_SDCLK _ON.When set this bit to 0, clk is fully controlled by the hardware. I also confused about this,by what hardware 

Labels (2)
0 Kudos
Reply
8 Replies

2,823 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Would be possible that you tell us the example that you are using and if you are using an external wifi module

Regards

 

0 Kudos
Reply

2,810 Views
little123
Contributor I

@vicentegomez hi,I‘m using the wifi_setup example of sdk 2.13.0 of the evkmimxrt1060, the path is sdk 2.13.0 ->boards->evkmimxrt1060->wifi_examples->wifi_setup. I don’t use the external wifi module and I just want to study sd I/o driver by this example

0 Kudos
Reply

2,781 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

 

If you are interested into the usage of the sdio without using a WIFI module, I would recommend you to maybe start with an easier example , I would recommend you to check the sdcard_freertos example , you can find the SD_SelectBusTiming function which might be just what you are looking for to clarify your doubts.

 

Also, I would recommend you to check the Secure Digital Card/Embedded MultiMedia Card/SDIO card API reference manual

 

 

Regards,

 

0 Kudos
Reply

2,738 Views
little123
Contributor I

@estephania_mart  hi,thank you for the suggestions, I want to study the diver of sd I/O card , not sd memory card and the initialization of these two kinds of  sd card is different, including procedures and commands. I will change an easier example as you said, and try to find out how the driver API control the sdclk on and off 

0 Kudos
Reply

2,720 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello ,

 

While there is no specific example for SDIO only in the SDK , you can find the drivers as well available in the example mentioned before.

Still , for the configuration in the wifi example, when following the configuration ans code setup, you will get to the BOARD_WIFI_BT_Config function in the wifi_bt_config.c. Then you will need to go to the BOARD_SDIO_Config to end up in the ((sdio_card_t *)card)->host->hostController.sourceClock_Hz = BOARD_USDHC1ClockConfiguration(); for the clock configuration

 

Hope this helps.

Regards

0 Kudos
Reply

2,691 Views
little123
Contributor I

@estephania_mart hi,I checked the functions as you said, and there is no control of the sdclk on or off. According to the SD protocol, the host shall stop supplying sdclk before switching voltage. And I can’t find this procedure in the function named SDIO_SwitchVoltage in the fsl_sdio.c. I read the IMXRT1060-reference that download from NXP, and can’t find the related register to control the sdclk. In the sector 25.5.8, first line of the third paragraph, “By clearing the clock enabled bits in the System Control Register, the clocks are gated in the low position to the uSDHC.” There is no such clock enabled bits in the system control register!!! Can you help me to find the related register? I really confused about the datasheet.

0 Kudos
Reply

2,620 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

 

Please, help me check the section 14.7.27 CCM Clock Gating Register 6 (CCM_CCGR6), page 1085 and 1086 for the 3–2 CG1, where you can find the usdhc1 clocks (usdhc1_clk_enable).

Also, you can find in the fsl_sdio.c for the SDIO_HostDeinit to see if that helps you.

 

Regards,

 

0 Kudos
Reply

2,811 Views
little123
Contributor I

I‘m using the wifi_setup example of sdk 2.13.0 of the evkmimxrt1060, the path is sdk 2.13.0 ->boards->evkmimxrt1060->wifi_examples->wifi_setup. I don’t use the external wifi module and I just want to study sd I/o driver by this example

0 Kudos
Reply