read/write external flash(GD25Q16E) fail with QSPI

Hi Nordic,

I am working with nRF52840, sdk17.1.0 and got a pcb with external flash with GD25Q16E.

Pins usage are:  SCLK: P0.25,  CS:P1.00,  SIO0:P0.21,   SIO1:P0.15,  SIO2:P0.22, SIO3:P0.19

First I have modified the pins and used the example on sdk\examples\peripheral\qspi\ to run on pcb.

    .pins = {                        \
       .sck_pin     = 25,            \
       .csn_pin     = 32,            \
       .io0_pin     = 21,            \
       .io1_pin     = 15,            \
       .io2_pin     = 22,            \
       .io3_pin     = 19,            \
    }, 

After running the code, I got "Data inconsistent". The result is fail, all read data is 0x88.

Then. I compared commands between GD25Q16E and MX25R6435F, most commands are the same but switching to qspi mode.

So I removed the "switching to qspi mode" code, run again. The result is still fail, all read data is changed to 0xFF.

#if 0
    // Switch to qspi mode
    cinstr_cfg.opcode = QSPI_STD_CMD_WRSR;
    cinstr_cfg.length = NRF_QSPI_CINSTR_LEN_2B;
    err_code = nrf_drv_qspi_cinstr_xfer(&cinstr_cfg, &temporary, NULL);
    APP_ERROR_CHECK(err_code);
#endif

My questions are:

1. What will cause the all data is 0xFF? Is it possible writing also fail?

2. Does need resister/capacitance/... on the qspi pins  or  just connected directly ?

3. Do you have worked on GD25Q16E? Could give me a guide?

Best Regards,

Gavin

  • That error sounds like a more generic error with the connection between jlink and nRF52. Does any other nrfjprog command work? E.g. how about just reading internal flash of the nRF52 using nrfjprog --memrd 0

    What does it say if you call nrfjprog --version

    If you are able to read using nrfjprog --memrd 0, then it sounds to be a error of the qspi interface yes. Though you can run the qspi commands on an DK for comparison also. 

    Though you have not told me if the 'nrfjprog --qspieraseall' and 'nrfjprog --readqspi filename' did succeed.

    Best regards,
    Kenneth

  • Hi Kenneth,

    update first:

    C:\Users\Gavin>nrfjprog --version
    nrfjprog version: 10.15.2 external
    JLinkARM.dll version: 7.58b

    C:\Users\Gavin>nrfjprog --memrd 0
    ERROR: Unable to connect to a debugger.
    ERROR: JLinkARM DLL reported an error. Try again. If error condition
    ERROR: persists, run the same command again with argument --log, contact Nordic
    ERROR: Semiconductor and provide the generated log.log file to them.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.

    'nrfjprog --qspieraseall' and 'nrfjprog --readqspi filename' both fail.

    Although this problem(Unable to connect to a debugger) occurs, Jlink is workable in SEGGER IDE.

    Is it weired?    what is the different  between jlink and nrfprog?

    Best regards,

    Gavin

  • Can you try to do a restart of your computer, and don't start up any other program on your pc, but only try to run the nrfjprog command? Are you sure you have connected both gnd, vdd, swdio and swdclk.

    Kenneth

Related