I am getting the kStatus_SDMMC_CardNotSupport error when trying to initialize a microSD card on the board we have built that is using the MK22FN1M0VLL12 MCU.
I'll paste the relevant code below so hopefully someone can assist with the issue:
The SD_Init function is where it fails.
SD_SendApplicationCmd is then where it fails next.
Finally, it returns at the if statement there returning kStatus_SDMMC_CardNotSupport.
Can anyone provide any solutions? Thank you for your time.
Hi Thanh Dang
Before you tried with your own board, did you manage to run the example code in our evaluation board? TWR-K21? this should help to discards any hardware problem. Also, what SD memory are you using? this issue only happened with this memory or have you tried different kinds of memories?
The Card not support status could happen when your clocks are not correct and the card doesn't respond as it should.
Thank you. We tried the code on the tower board and received the same error. We are using a MicroSD which we have used with our eval code and it worked successfully. The problem comes when trying to port that eval code over to our production board which is what was posted above.
We have checked the clocks, we are running the bus clock at 374491.
It appears we are getting all zeros back for an R1 response above.