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

nRF52840 read/write issue over SPI connected with Flash

Hello,

My nRF52840 board is connected with SPI flash over SPI. I have configured the nordic as master and my SPI flash is slave as mentioned below:

.sck_pin = SPI_SS_PIN, 
.mosi_pin = SPI_MOSI_PIN, 
.miso_pin = SPI_MISO_PIN, 
.ss_pin = SPI_SCK_PIN, 
.irq_priority = SPI_DEFAULT_CONFIG_IRQ_PRIORITY, 
.orc = 0xFF, 
.frequency = NRF_DRV_SPI_FREQ_4M, 
.mode = NRF_DRV_SPI_MODE_0, 
.bit_order = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST,

Using the internal API "nrf_drv_spi_transfer", I am able to read the data but I am not able to write data on SPI flash. I am writing the first WREN(0x06) command before writing anything but it seems it doesn't work. However, If I take a look at the logic analyzer, it shows a bit shifted to the right side for every read-write operation, but it reads it right.

Can you please point me out where exactly I am missing something?

Any help would be greatly appreciated.

Thanks,

Hardik

Parents Reply Children
No Data
Related