nr52832 + nRF Connect 1.8.0 + External Flash

Hello Team,

We are interfacing nRF52832 with an external flash for data storage. Could you please point to the right document/link/code reference on how to interface external flash (on SPI) with nRF52832 on nRF Connect SDK 1.8.0?

Thanks!

Parents
  • Hi Hakon,

    Thanks for the info.

    Using SPIM with "CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58=y" did compile the code and I don't see earlier error during boot. However, it definitely fails write transactions with warning:

    W: Transaction aborted since it would trigger nRF52832 PAN 58

    So, as you suggest, we shouldn't be using SPIM but we will have to stick with the SPI driver. 

    Do you have any other suggestions to get rid off below error during boot:

    E: Device id 00 00 00 does not match config ef 40 14

    I am still able to communicate with the Flash using SPI APIs, but I do see this error every time I reboot the board now. Please note, we want this to work since we are planning to use External flash for OTA in our next stage of development.

    Thanks!

Reply
  • Hi Hakon,

    Thanks for the info.

    Using SPIM with "CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58=y" did compile the code and I don't see earlier error during boot. However, it definitely fails write transactions with warning:

    W: Transaction aborted since it would trigger nRF52832 PAN 58

    So, as you suggest, we shouldn't be using SPIM but we will have to stick with the SPI driver. 

    Do you have any other suggestions to get rid off below error during boot:

    E: Device id 00 00 00 does not match config ef 40 14

    I am still able to communicate with the Flash using SPI APIs, but I do see this error every time I reboot the board now. Please note, we want this to work since we are planning to use External flash for OTA in our next stage of development.

    Thanks!

Children
  • Hi,

     

    embeddedER said:
    E: Device id 00 00 00 does not match config ef 40 14

    This is an actual read out over the SPI bus, where as a part of the initialization of the SPI NOR flash device, the nRF reads out its ID and compares it to the one you've set in the .overlay file.

    If this is all zero's, it means that the nRF is having issues reading your flash device. It can be many reasons why, for instance that the SPI speed is too high, creating issues for the GPIOs themselves to comply with the electrical specifications (ie. too much capacitance on the lines). This is easily testable by reducing the SPI speed.

    Please use a oscilloscope to verify if the toggling of the SPI signal is reaching GND and VDD levels and providing a nice and clean signal.

    As previously mentioned, your current speed is 8 MHz, which is too high if your routing is long. Reducing this to 1 MHz should help that scenario.

    Have you for instance double checked the timing parameters that you provided in the .overlay files with the electrical specifications of the flash itself? Parameters " t-enter-dpd = <3000>;" and "t-exit-dpd = <30000>;" ?

     

    Kind regards,

    Håkon

Related