Interfacing nrf 5340 dk with Winbond W25Q128JV serial flash memory breakout board from sparkfun

Greetings,

I am fairly new to SPI interface. I tried interfacing my Winbond serial flash memory breakout board with nrf 5340 dk using the master-slave code that I found. I did modify the overlay file and main file to make it just master code. This is my overlay file.

For the main file, I am only trying to see if SPI communication is established and get a manufacturer id for my flash memory. According to winbond datasheet, I guess I need to enable a reset instruction before reading the part id. Here is my main code:

My wiring details:
Winbond W25Q128JV          nrf5340DK
3.3V                                       Vdd
cs                                           P1.12(SS)
clk                                          P1.15SCK
DI                                           P1.13MOSI
DO                                         P1.14MISO
WP                                         pulled high(active low)
HLD                                        pulled high(active low)
GND                                       GND
My serial terminal output is always 0xff. I am not sure if my SPI communication has been properely established or not. Here is the screenshot of my terminal
Parents
  • Hi,

    Could you edit your ticket and add the code into Insert->Code boxes?
    This will help us keep DevZone tidy.

    I will have a look at this ticket and help you with it when you have done so.

    Example:

    Regards,
    Sigurd Hellesvik

  • Nice!

    am not sure if my SPI communication has been properely established or not.

    The first question to ask is:
    Is  the nRF not sending SPI?
    Or is the slave not responding?

    The best way to check this is to probe the SPI lines with a logic analyzer or oscilloscope.
    Could you do that and provide an image of the graphs here?

Reply
  • Nice!

    am not sure if my SPI communication has been properely established or not.

    The first question to ask is:
    Is  the nRF not sending SPI?
    Or is the slave not responding?

    The best way to check this is to probe the SPI lines with a logic analyzer or oscilloscope.
    Could you do that and provide an image of the graphs here?

Children
No Data