I am working on a device driver for the W25Q128JV flash device. This is the first SPI device I've used with the nRF52840. I had some observations and questions about SPI programming on this mcu.
I am working on a device driver for the W25Q128JV flash device. This is the first SPI device I've used with the nRF52840. I had some observations and questions about SPI programming on this mcu.
Hi,
Not certain the first approach you suggest is the best, since it re-write the write buffer in RAM with what's showing up on the MISO at the same time as it sends out data on MOSI. In theory the peripheral is probably done reading the relevant byte from RAM before the transfere starts.
255 byte limit is correct for the nRF52832 SPIM, witch is a 8-bit MAXCNT register.
If you wish to send longer packages i would recommend to migrate to nrfx_spim as a alternative to nrf_drv_spi diver.
Regards,
Jonathan
Hi,
Not certain the first approach you suggest is the best, since it re-write the write buffer in RAM with what's showing up on the MISO at the same time as it sends out data on MOSI. In theory the peripheral is probably done reading the relevant byte from RAM before the transfere starts.
255 byte limit is correct for the nRF52832 SPIM, witch is a 8-bit MAXCNT register.
If you wish to send longer packages i would recommend to migrate to nrfx_spim as a alternative to nrf_drv_spi diver.
Regards,
Jonathan