I have done some digging and I see that the driver fsl_sdmmc_host implemented a method included the use of an OSA adapter in order to detect the sd card. In fact all sdmmc driver include the use of OSA in some extend whether used non-blocking or not.
I understand that detection through CD pin is the preferred solution, but due to hardware design DAT3 card detection need to be used in our case.
So, I want to ask if there is a way to do data3 detection in bare metal?
In fsl_sdmmc_host.c
Hi @TomC818
Yes, you can implement DAT3 card detection in bare metal on the NXP MCXN947, even without an RTOS or the OSA layer. The key is to replicate the logic used in the SDK's fsl_sdmmc_host.c but replace the OSA-dependent parts with your own delay and GPIO control functions.
BR
Harry