Using SD card on nRF9161 DK

Hello, we've a nRF9161 DK board a we saw on the back side a footprint for mounting an SD card holder and we found the SD card holder component in the BOM.

Unfortunately there is no mention about the usage of the SD card in for the nRF9161 DK anywhere in the documentation.

Is there any problem on using the SD card on nRF9161 DK (trough SPI I guess) ?

What do we have to do to connect the SD card to the nRF9161 module (excluding the soldering of the card holder)?

Thanks in advance for the support,

Joel

Parents
  • I was talking about J8 on the bottom side of the board listed on the BOM as "microSD Card Connector"...

  • Ok, I see whay you mean. This is for internal debugging only. Here's how it's connected: 

    pca10153_schematic_and_pcb.pdf

    I guess you can mount the holder and access the SD card from the GPIOs it's connected to.

  • Hello, I know it is a while now that this thread remained in an inactive  state ... but now I'm back... I ordered the microSD card holder and it has been soldered on J8 on the  bottom side of the DK... I was now taking a look into how to configure the nRF9161 to enable it to access the SD card via SPI... According to the DK schematic the chip select to P0.25, SCK to P0.21, MISO/DO P0.22 and these signals are OK. MOSI/DI instead is connected to the DBG_CMD signal which ends on pin 125 of the nRF9161 module. This pin, in the datasheet, is  signed as "Do not connect/reserved for future use" ... 

    How can I use the SPI interface to control the SD card without using the MOSI ?

  • Other issue... SD card in SPI mode requires power supply and signaling at 3.3 VDC. On the nRF9161 both power supply and signaling are at 1.8 VDC.

  • Looking at the schematics of the nRF9161 DK with some more attention it becomes clear why the uSD card holder hasn't been soldered. 

    With the factory power supply configuration, J8 becomes useless (for an standard uSD card)  ... there is no SD card on  the market requiring only 1.8 VDC power supply ... 

    The easiest way to get uSD card support on nRF9161 is using an external level shifter module (1.8 -3.3 VDC) together with a uSD card holder module together with some flying wires ... 

  • After saving discovered that there is no way of using the SD card holder on the DK board, following the instructions found in this forum, I connected an external level shifter board ( 1.8-3 VDC) and a uDS card holder board to the nRF9161 DK board SPI has been connected to SPI3 on:

    CLK -> P 0.13 (100 ohm termination resistors on the two drivers)

    MISO -> P 0.12

    MOSI -> P 0.11

    CS -> P 0.10

    I added the following stuff to the .overlay file:

    &spi3 {
        cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>, /* D10 */
                   <&gpio0          20 GPIO_ACTIVE_LOW>;

        sdhc0: sdhc@0 { // SPI SD card
            compatible = "zephyr,sdhc-spi-slot";
            reg = <0>; // First chip select in the spi3 definition
            status = "okay";
            mmc {
                compatible = "zephyr,sdmmc-disk";
                status = "okay";
                disk-name = "SDCard";
            };
            spi-max-frequency = <1000000>;
        };
    };

    Unfortunately I can't find anywhere instructions on how acceding this card using an LittleFS file system

    How shall I proceed to make this SD card available to Zephyr trough LittleFS file system ?

    Thanks, Joel 

Reply
  • After saving discovered that there is no way of using the SD card holder on the DK board, following the instructions found in this forum, I connected an external level shifter board ( 1.8-3 VDC) and a uDS card holder board to the nRF9161 DK board SPI has been connected to SPI3 on:

    CLK -> P 0.13 (100 ohm termination resistors on the two drivers)

    MISO -> P 0.12

    MOSI -> P 0.11

    CS -> P 0.10

    I added the following stuff to the .overlay file:

    &spi3 {
        cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>, /* D10 */
                   <&gpio0          20 GPIO_ACTIVE_LOW>;

        sdhc0: sdhc@0 { // SPI SD card
            compatible = "zephyr,sdhc-spi-slot";
            reg = <0>; // First chip select in the spi3 definition
            status = "okay";
            mmc {
                compatible = "zephyr,sdmmc-disk";
                status = "okay";
                disk-name = "SDCard";
            };
            spi-max-frequency = <1000000>;
        };
    };

    Unfortunately I can't find anywhere instructions on how acceding this card using an LittleFS file system

    How shall I proceed to make this SD card available to Zephyr trough LittleFS file system ?

    Thanks, Joel 

Children
No Data
Related