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

    Thank you for your quick response and for the info you have provided. It is very helpful.

    nrf_test-spi_flash2.zip

    With respect to question 1, yes, I am using the standard nRF52840DK.

    I tested this again by creating a brand new project and importing the sample. It still doesn't work.

    When I inspect the compile logs in more detail I see the following error which may explain why it isn't working.

    I am not sure why it is giving this error. I haven't changed anything in the settings.

    I have had other sample apps that required updating before they would work but in this case I'm not sure what needs to change as there is very little in the project to start with.

    I have attached the project for your reference.

    Thanks,

    Gary

Reply
  • Hi Amanda

    Thank you for your quick response and for the info you have provided. It is very helpful.

    nrf_test-spi_flash2.zip

    With respect to question 1, yes, I am using the standard nRF52840DK.

    I tested this again by creating a brand new project and importing the sample. It still doesn't work.

    When I inspect the compile logs in more detail I see the following error which may explain why it isn't working.

    I am not sure why it is giving this error. I haven't changed anything in the settings.

    I have had other sample apps that required updating before they would work but in this case I'm not sure what needs to change as there is very little in the project to start with.

    I have attached the project for your reference.

    Thanks,

    Gary

Children
Related