Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I'm using the Segger nRF52840-DK and I want to add support for SPI?

I'm using the nRF52840-DK evaluation software from Segger. I want to add NAND Flash support, so I want to add an SPI interface. I have looked at the example in nRF5SDK160098a08e2 and that works nicely on my board, but I'm having difficulty moving that SPI example to the nRF52840-DK project as there are dependencies on Integration, module and components folders. isn't there a much simpler way to just add SPI support like there is when using ST Micro Cube IDE? I did manage to have a successful build with nrfx version of SPI, but the driver won't work correctly on my board.

I'm using the latest version of Segger Embedded Studio.

Regards,

John

  • Hello John,

    john3909 said:
    The device has several sensors that are sampled every 2mS and stored to a 128K buffer and then stored to SDCard when the buffer is full. The SDCard is the only device that consumes a lot of power (100mA during read/write), so we have this powered down for most of the time and only power up when writing. We want to keep the write as short as possible, so a 4bit operation is preferred.

    I understand. Reducing the active SDCard time will definitely help your power consumption.
    Perhaps you would want to use the SPIM3 from the example at 32 MHz instead of the 16 MHz it is currently configured to?
    Be advised that you then might have to increase the drive strength of the SCK and MOSI pins, depending on your hardware configuration - given that your SDCard supports this frequency, that is.

    john3909 said:
    The link you provided refers to another document that is referencing the same part as ours, but on the BMD340 part.

    Yes, the other user seem to be using the same NAND Flash - interfaced using SPI. However, I do not know if that user had the same power constraints as those present in your project.

    john3909 said:
    Do you have an NAND Flash example driver we can used as a reference.

    The fatfs_spim example was intended as such. Could you elaborate more on what specific functionality you would like to see demonstrated?

    Best regards,
    Karl 

Related