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

Sending data via SPI driver to External memory

Hi,

I am beginner with nrf9160 and its SDK. I want to send data from nrf9160 to an external flash memory. To test it I wanted to start simply by sending hello_world(sample project that is given in nrfsdk) to an external flash memory. I found this zephyr/samples/drivers/spi_flash_at45/, however I don't know how to use it in my hello world example program to send the data via SPI. Can you help me with that? The existing opened project in SDK is hello world and I want to use the code of spi_flash_at45, I couldn't figure out how to combine them. It would be great if you can explain to me clearly what should I do.

Also, I want to send the file that I downloaded via http_update_sample directly to the external flash memory via spi, again I am stuck at the point:  which part of the http_update sample should I add this spi_flash_at45 code to make things work.

Thank you so much for the help.

Parents
  • Hello,

    do you have a device from the AT45 family? If you do, you can probably look at the AT45 sample and just modify at your own discretion. You might need to create an overlay file if you don't have the AT45DB321E chip.

     

    Also, I want to send the file that I downloaded via http_update_sample directly to the external flash memory via spi, again I am stuck at the point:  which part of the http_update sample should I add this spi_flash_at45 code to make things work.

     Do you want to write it to the external flash without using the nrf9160 flash at all, or is it okay to write it to the on board flash and then copy it to the external flash?

  • Hi Hakan,Thanks for the reply. Yes, I want to write it to the flash without using nrf9160, I am only dowloading the file via nrf9160 and want to save it in the external memory spi flash W25N01GV. I have already look the sample code in spi_flash_at45 however I couldn't figure out how to add my external flash's info inside the overlay file. Are there any examples about how can I implement my own flash driver so that I can figure out what should I do to make things work.

  • It looks to me that the W25N01GV is a QSPI flash. Do you know if it also supports regular SPI as well? The nRF9160 does not have QSPI, so your external memory would need to have support for SPI read/write.

Reply Children
Related