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,

    1. I tried with erase and flash, but it didn't help.

    2. I tried with Ozone debugger (Run program in debug mode from Ozone) and it detects Flash chip every time. No error message (E: Device id 00 00 00 does not match config ef 40 14). However, I think this behavior is same as pressing Reset button on our board and it works with that too.

    Issue is when I connect the power for the first time with the board (same as when I program the board using JTAG). Unless I press the reset button, it doesn't detect 

    I also tried one more thing: reboot the board using sys_reboot(SYS_REBOOT_COLD/WARM) after failing to get the Flash device binding. With this, after cold/warm boot, Flash chip is detected. First cycle after flash fails, but all cycles after sys_reboot are OK.

    Is there a way we can try initializing the Flash device at the run time? Probably mimic what's happening during the boot time (using overlay content)?

    Any other suggestions?

    Thanks!

  • Hi,

     

    embeddedER said:
    2. I tried with Ozone debugger (Run program in debug mode from Ozone) and it detects Flash chip every time. No error message (E: Device id 00 00 00 does not match config ef 40 14). However, I think this behavior is same as pressing Reset button on our board and it works with that too.

    Resetting and running in vscode should yield the same behavior as with Ozone. This seems strange to me that it only shows itself when you're using the cortex m debug in vscode, which leads me to think that there's something in the way that the plugin itself works that is causing the behavior.

    In VScode, when entering debug mode, you should see this appearing:

    If you click this image:

    It should reset the target and run to main().

    Could you confirm if the readout still fails even after a reset in the debugger?

    Could you also share the debug console output?

    embeddedER said:
    Is there a way we can try initializing the Flash device at the run time? Probably mimic what's happening during the boot time (using overlay content)?

    It is not an easy method to change the ordering, as the spi-nor is initialized before main in reached.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    embeddedER said:
    2. I tried with Ozone debugger (Run program in debug mode from Ozone) and it detects Flash chip every time. No error message (E: Device id 00 00 00 does not match config ef 40 14). However, I think this behavior is same as pressing Reset button on our board and it works with that too.

    Resetting and running in vscode should yield the same behavior as with Ozone. This seems strange to me that it only shows itself when you're using the cortex m debug in vscode, which leads me to think that there's something in the way that the plugin itself works that is causing the behavior.

    In VScode, when entering debug mode, you should see this appearing:

    If you click this image:

    It should reset the target and run to main().

    Could you confirm if the readout still fails even after a reset in the debugger?

    Could you also share the debug console output?

    embeddedER said:
    Is there a way we can try initializing the Flash device at the run time? Probably mimic what's happening during the boot time (using overlay content)?

    It is not an easy method to change the ordering, as the spi-nor is initialized before main in reached.

     

    Kind regards,

    Håkon

Children
No Data
Related