I am trying to get an SD card working with the NRF52832 chip, starting with the sd card example (SDK 14.2) using the fatfs module.
The SD card I am using is a Kingston 8GB class 4 card.
The nordic chip is in a Dynastream M8 module.
The problem is that when I first insert the card the example works fine. Before initialisation the chip is using 4mA (due to other sensors on my board). The card initialises fine, and I get this output from the example code:
However after this has run, the current usage goes up to 44mA and stays there. Furthermore, if i try to run the example code again initialisation fails, and I get the following message (note the spurious capacity).
I have tried unmounting the volume, and uninitialising the fatfs module, but it makes no difference.
Here is the full example code (with unmount and uninitialise added):
If I power down the board, or remove and reinsert the card, the example will work again, but only the once, calling it multiple times it fails on the second time.
So in short I have two issues: The first and most important is high current usage after inisitalising the card despite it not reading or writing, and second is unable to reinitialise card if it has been previously initialised. I appreciate that should not be necessary but I was thinking to get to a low power state uninitialising would be necessary.
It seems like if I were able to force the card to reset I would be able to get around it, or otherwise force the card into a sleep mode. Is that possible? Otherwise, any suggestions on how I can prevent this behaviour?