I want to interface a 16MB external flash (SPI) with nrf52832 on the development board.Suggest me how should I start with and if there is an example for external flash then let me know.
I want to interface a 16MB external flash (SPI) with nrf52832 on the development board.Suggest me how should I start with and if there is an example for external flash then let me know.
Hi
What kind of external flash device do you want to connect?
Are you planning to use a file system, or will you just access the flash using low level read/write/erase commands?
The usbd_msc example in the SDK allows you to access SD cards over the SPI interface, if you compile the example with the USE_SD_CARD define set to 1 (located on line 106 of main.c).
Unfortunately this example is designed for the nRF52840 only, since it uses the USB interface in the nRF52840 to enumerate the connected SD card as a flash drive when connected to a PC.
Best regards
Torbjørn
I want to interface MX25R1635F FLASH memory with nrf52832. And no file system but want to access its read,write and erase commands. I have seen the qspi example but got confused with it as my I have nrf52832 that does not support QSPI.
One more thing and if I want to erase :
sector 0 do i have to give address as 0x000000,
sector 1 as 0x008000
sector 2 as 0x010000 ????
Hi
It seems there are a couple of problems here. First off the UART TX buffer should be increased to allow the longer log messages to be buffered properly (I increased it from 256 to 1024 bytes), but more importantly the SPI driver is limited to 255 byte transactions, which makes it fail when you try to send 256 bytes in one go.
I made a slight change to the driver to split transactions longer than 255 bytes into multiple transactions:
Please note that the sensor has it's own limitations. If I remember correctly you can't write more than 256 bytes in one go (but I am sure you can read more).
Regarding erase I think it is sufficient to specify any address within the block to erase the whole block, but specifying the start address of the block seems the most logical.
Best regards
Torbjørn
Thanks a lot, Torbjorn. I tried whole day to get make the flash write 256 bytes but was not able to do :( Thank you for your support. :). I tested it with my hardware and its working.
That's great, hopefully you will have less problems going forward
Thanku for your best wishes.
Thanku for your best wishes.