This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Segger JLink to access external SPI NOR flash on pca10056

Hi,

is it possible to read/write the MX25R6435F external SPI NOR flash using Indirect Mode (https://wiki.segger.com/Programming_External_SPI_Flashes) with Segger JLink?

Currently I am getting 

- Start of determining flash info (Bank 1 @ 0x00000000)
- ERROR: Could not find CFI compliant flash device
- ERROR: Error while determining flash info (Bank 1 @ 0x00000000)
- ERROR: Failed to read back target memory
Disconnecting ...
- J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
- Disconnected

According to https://www.segger.com/downloads/supported-devices.php parallel CFI NOR flash should be supported:

Name Core Supported flash types Notes
Nordic Semi
nRF52840_xxAA Cortex-M4 Parallel CFI NOR flash
Internal flash

Is the MX25R6435F CFI compliant?

If I deselect automatic flash memory detection in the project settings, I cannot see the flash device:

JFlash SPI, which I would use to connect the device in direct mode supports the device:

https://www.segger.com/products/debug-probes/j-link/technology/cpus-and-devices/supported-spi-flashes/

Is it possible to use the indirect mode or do I need to solder and interface directly with the flash chip?

Thanks,

Markus

  • Hmm, seems the MX25R6435F is a serial NOR flash, not a parallel NOR flash.

  • Hi,

    You can use nrfjprog to read and write to the MX25R6435F flash on the nRF52840 DK. If you make a custom board later that has a different flash or a different pinout you need to make your own QspiDefault.ini, and point to that with the --qspiini option to nrfjprog.

  • Thanks for the hint on nrfjprog. Did not know that it can do that. I have tried it, and it unfortunately fails.

    I have read out the MX25R6435F and the resulting hex file is all 8's:

    When writing a hex file to 0x12000000, I get a verify fail:

    $ nrfjprog --qspichiperase --program extflash-mod.hex --verify
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    WARNING: An operation that can take up to several minutes is being executed.
    WARNING: Please remain patient.
    Initializing the QSPI peripheral.
    Erasing external memory.
    Uninitializing the QSPI peripheral.
    Checking that the area to write is not protected.
    Programming device.
    Initializing the QSPI peripheral.
    WARNING: An operation that can take up to several minutes is being executed.
    WARNING: Please remain patient.
    WARNING: An operation that can take up to several minutes is being executed.
    WARNING: Please remain patient.
    WARNING: An operation that can take up to several minutes is being executed.
    WARNING: Please remain patient.
    WARNING: An operation that can take up to several minutes is being executed.
    WARNING: Please remain patient.
    WARNING: An operation that can take up to several minutes is being executed.
    WARNING: Please remain patient.
    WARNING: An operation that can take up to several minutes is being executed.
    WARNING: Please remain patient.
    WARNING: An operation that can take up to several minutes is being executed.
    WARNING: Please remain patient.
    WARNING: An operation that can take up to several minutes is being executed.
    WARNING: Please remain patient.
    Uninitializing the QSPI peripheral.
    Verifying programming.
    Initializing the QSPI peripheral.
    ERROR: Write verify failed.

    Also the readback from the flash is again all 8's.

  • OK, you should really not at the same time run a program that is accessing the external flash....

    After an erase of the internal flash, I can flash and verify the content of the external flash.

Related