[SOLVED] Failed to detect the SPI flash

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Failed to detect the SPI flash

    Hi everyone,

    I develop a bare metal firmware for the system using iMX6S5.
    It run directly to RAM memory without any problem with debugging through GDB J-Link, JTag and Eclipse.
    However the requirement for the system is booting from SPI Flash. The system use the SPI Flash Spansion S25FL064L.
    I use the J-Flash SPI V6.22f via J-Link to flash the binary but it can not detect the SPI flash.
    The error message is:
    Connecting ...
    - Connecting via USB to J-Link device 0
    - VTarget = 3.317V
    - Read SPI Flash Id = 0x00 00 00
    - ERROR: Failed to auto-detect SPI Flash.
    - Failed to auto-detect SPI Flash.



    I tried to change all the device but have the same result.
    I checked in the document, the SPI Flash Spansion S25FL064L is supported by J-Flash SPI. Can some one here help me to figure it out ? Can I use the J-Flash to flash the binary to SPI Flash ?

    Best Regards,
    Nguyen.
  • Hello Nguyen,

    Thank you for your inquiry.
    How is the SPI Flash connected to the J-Link? Direct or indirect?
    More information can be found here: wiki.segger.com/Programming_External_SPI_Flashes

    Currently only direct mode is supported by J-Link for that Flash.
    Indirect mode is not yet implemented. A list with supported iMX6 devices in indirect mode can be found here: wiki.segger.com/IMX_Series_Devices


    Best regards,

    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Nino,

    Thanks for your reply.
    My connection is indirect, so follow the link, the JLink SPI can not use.
    However when I use the J-Flash, in the Project Settings/Flash, there is no SPI flash devices as I used. If I choose "Automatically detect flash memory", I have the error:

    - Connecting via USB to J-Link device 0
    - Target interface speed: 12000 kHz (Fixed)
    - VTarget = 3.317V
    - Executing init sequence ...
    - Initialized successfully
    - Target interface speed: 4000 kHz (Fixed)
    - J-Link found 3 JTAG devices. Core ID: 0x4BA00477 (None)
    - Connected successfully
    Blank checking target ...
    - 1 of 1 sectors selected, 1 range, 0x0 - 0xFFFFFFFF
    - Start of determining flash info (Bank 0 @ 0x00000000)
    - ERROR: Could not find CFI compliant flash device
    - Error while determining flash info (Bank 0 @ 0x00000000)
    - End of determining flash info
    - Flash bank info:
    - 1 * 0 bytes @ 0x00000000
    - ERROR: Failed to check blank target
    Disconnecting ...
    - Disconnected

    Programming and verifying target (9176 bytes, 1 range) ...
    - Start of determining flash info (Bank 0 @ 0x00000000)
    - ERROR: Could not find CFI compliant flash device
    - Error while determining flash info (Bank 0 @ 0x00000000)
    - End of determining flash info
    - Flash bank info:
    - 1 * 0 bytes @ 0x00000000
    - ERROR: Failed to program and verify target
    Disconnecting ...
    - Disconnected



    Do you have any idea about this issue? Can you suggest me the way that I can flash the binary to SPI Flash?

    Best regards,
    Nguyen.
  • Hello,

    As I wrote earlier, indirect mode is not yet implemented for the iMX6S5 device series.
    In the Wiki article I linked you you can find a Link to our open flash loader interface: wiki.segger.com/Adding_Support_for_New_Devices
    With the open flash loader you can implement SPI Flash support yourself.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.