Hello,
I have been using nRF52840-DK and also nRF52840 Dongle for testing and I found an interesting behaviour when I established my test setup. The RF module acts as an SPI slave towards another MCU, and also acts as an SPI master towards a micro SD card extension. As far as I know most of the existing GPIO pins can be configured to be used as SPI pins so based on that my PIN layout is the following:
SPIM (micro SD card extension):
- SCK: P0.31
- MISO: P0.13
- MOSI: P0.15
- CS: P1.0
SPIS (another MCU):
- SCK: P1.10
- MOSI: P1.15
- MISO: P1.13
- CS: P0.2
Also there is an additional GPIO configured as output on P0.29.
I also set the MISO Pull configuration to pull-up because I read (https://devzone.nordicsemi.com/f/nordic-q-a/24334/fatfs-example-sdk14-0-0-not-working#post-id-163682) that it is needed for the fatfs library to work as expected for new generation micro SD cards.
The issue is when I execute my program the nRF52840-DK works perfectly and the data is written to the SD card always, but when I use the Dongle the data is usually not written (fatfs fails with disk initialization failure). It only happens when I use a new generation 32Gb U3 and U1 micro SD cards, the issue is not present for older versions (with 16Gb U1 works fine).
I tried to change the RF module (Dongle), cables, and tested the setup with 3 different kind of micro SD card extensions, for all of them I received the same result. Also tested the SPIM and SPIS separately and like that both works fine (even the fatfs example works flawlessly).
Is there any difference in the PIN configuration or setup between the nRF52840-DK and Dongle that might cause this issue? Or do you have any PIN layout recommendations that might solve this issue if I intend to use SPIM and SPIS at the same time for the nRF52840 Dongle?
Thank you in advance for your support!