Help with SPI Flash sample and Info

Hi

I would like to include some flash in my project to store sensor readings. Please can you assist me with the SPI Flash sample and with some general questions on SPI flash chip compatibility.

I have a nRF52840 DK and I am using Zephyr Version 2.0.0.

I am trying to test the SPI Flash example found in the zephyr/samples/drivers/spi_flash directory.

The sample successfully compiles and flashes to my DK however there is an error when the application runs.

1) Is there something in the settings I am missing to get this working?

I see the devicetree for the DK refers to the following for the &qspi setting:

mx25r64: mx25r6435f@0 {
    compatible = "nordic,qspi-nor";

etc...

I assume this is using a Nordic provided qspi-nor driver as the interface for this flash chip?

I would like to include a 512kb SPI NOR chip on my device.

For example, this: https://rocelec.widen.net/view/pdf/wjbo7ufnsm/SGSTS20956-1.pdf?t.download=true&u=5oefqw

or this: https://www.macronix.com/Lists/Datasheet/Attachments/8750/MX25V5126F,%202.5V,%20512Kb,%20v1.1.pdf 

2) Is there any way to tell which specific manufacturers or chips the Nordic driver is compatible with that will help me with my selection or should all SPI NOR chips work with this driver?

3) Can the Nordic driver only handle Quad SPI chips or can it also work with Dual and Single SPI chips?

I see there is also a setting for:

compatible = "jedec,spi-nor";

4) Is this a standard Zephyr driver for SPI-NOR? How does this this driver differ from the Nordic one?

Thank you for your help.

Regards,

Gary

Parents
  • Hi Amanda.

    I have found the issue preventing this from working on my PC.

    In VS Code when I created the build configuration there is a "configuration" setting that needs to be set to prj.conf.

    I am sure this has automatically been set for all the other projects and samples I have used so I didn't think to check it. For some reason it wasn't set correctly for me in this instance. Once I set it to prj.conf the code works correctly on my DK.

    Thanks again for your help!

    Regards,

    Gary

Reply
  • Hi Amanda.

    I have found the issue preventing this from working on my PC.

    In VS Code when I created the build configuration there is a "configuration" setting that needs to be set to prj.conf.

    I am sure this has automatically been set for all the other projects and samples I have used so I didn't think to check it. For some reason it wasn't set correctly for me in this instance. Once I set it to prj.conf the code works correctly on my DK.

    Thanks again for your help!

    Regards,

    Gary

Children
Related