This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Configure SPI for FatFS example

Hi,

I have the FatFS example up and running with the SPI0 instance (default configuration).

Is it possible to use a SPIM instance instead or do they have some limitations? I would like to be able to use SPIM3 as it looks like it is the only way of getting speeds above 8Mbps.

Parents
  • Hi,

    Unfortunately, the app_sdcard is not written with support for SPIM3. Neither is the legacy SPI driver layer, that is used in the lower layers.

    I have attached a modified version of the fatfs example with a rewritten app_sdcard.c that use the nrfx_spim driver directly, instead of the legacy SPI driver layer.

    It is configured to use SPIM3 and 16 MHz frequency for the SD card data frequency. Note that the example have not been thoroughly tested, and it might be missing checks for wrong configurations. I have tested and verified that the example is able to read and write a SD card.

    fatfs_nrfx_spim3.zip

    Best regards,
    Jørgen

Reply
  • Hi,

    Unfortunately, the app_sdcard is not written with support for SPIM3. Neither is the legacy SPI driver layer, that is used in the lower layers.

    I have attached a modified version of the fatfs example with a rewritten app_sdcard.c that use the nrfx_spim driver directly, instead of the legacy SPI driver layer.

    It is configured to use SPIM3 and 16 MHz frequency for the SD card data frequency. Note that the example have not been thoroughly tested, and it might be missing checks for wrong configurations. I have tested and verified that the example is able to read and write a SD card.

    fatfs_nrfx_spim3.zip

    Best regards,
    Jørgen

Children
Related