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

SPI master RX problem with reception

Hi,

I use SPI Master driver to communicate with a flash memory.

I use SDK 12 and i use nrf_drv_spi_transfer(...); to write and read over SPI.

My problem is the following : I write 4 bytes of command and 2 bytes of reception. I received 6bytes with the two last bytes with my answer.

So my RX buffer have some useless data.

How can i only received usefull data ?

write on spi write on spi

TX buffer init TX buffer init

SPI configuration SPI configuration

SPI handler & buffer init SPI handler & buffer init

Result of the spi write/read Result of the spi write/read

As you can see, the case 0 to 3 are useless data. I dont want it.

regards,

Parents
  • hey MainOFF, i use VisualStudio and his extension VisualGDB. U can use spy windows to show all the variable you want. you just need to be carefull about the life cycle of the variable. For show in "real time" you need to show the live variable window. Same, be carefull about life cycle of variable. To show this windows, go to menu "debug"->"windows"->"live variables" or "debug"->"windows"->"spy"->"spy 1"

    yes it's works on NRF52 :)

Reply
  • hey MainOFF, i use VisualStudio and his extension VisualGDB. U can use spy windows to show all the variable you want. you just need to be carefull about the life cycle of the variable. For show in "real time" you need to show the live variable window. Same, be carefull about life cycle of variable. To show this windows, go to menu "debug"->"windows"->"live variables" or "debug"->"windows"->"spy"->"spy 1"

    yes it's works on NRF52 :)

Children
No Data
Related