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.
Hi
I don't think we have an example for this kind of flash device unfortunately.
You would have to set up the SPI interface yourself using the nrfx_spim driver ideally, and implement the functions you need from the device as described in the datasheet.
I suggest starting with the RDID command, as it lets you read a known value from the device which you can use to ensure that the SPI communication is working OK, that you are using the right SPI mode etc.
Best regards
Torbjørn
Hi , Torbjorn,
I tried interfacing the external flash with nrf52832. I a able to see the MOSI data which I send on Logic analyzer and it shows correct data but I am not able to get the data on MISO. it always gives 0xFF.
So what should I do now?
And I also referred the following link :https://devzone.nordicsemi.com/f/nordic-q-a/37196/spi-miso-data-is-not-reflecting-on-the-receive-buffer but still the same problem persists.
when I send write instruction - My tx buffer size is 20 bytes( 4 instruction byte and 16 data bytes) and I also kept by rx buffer size as 20
when I send read instruction -My tx buffer size is 4 bytes( 1 bytes opcode and 3 byte address to read from) and I also kept by rx buffer size as 20 still not getting data even though the data bytes is 16
Hi
Can you see on the logic analyzer what the MISO data actually is?
In other words, is the problem that the MISO data doesn't make it into the nRF52832, or is the problem that the external flash device doesn't output anything on MISO?
Did you try to issue the RDID command?
Best regards
Torbjørn