[SOLVED] Programming external S25FL128S (QSPI) with LPC1857 - problem

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

  • [SOLVED] Programming external S25FL128S (QSPI) with LPC1857 - problem

    Hello,

    I'm looking for solution problem with programming external Quad SPI flash via J-Link (J-Flash or something from Segger software pack).
    I know that standard environment to do it is:
    [img]http://i.imgur.com/YBXTNZp.jpg[/img]


    But my hardware is:
    [img]http://i.imgur.com/w7GApjR.jpg[/img]



    Keil provides template workspace to generate .FLM file to program external QSPI flash using my connection scenario.
    And now I'm doing it with Keil uVision, using .FLM (Flash Programming Algorithm) for my ext. Flash S25FL128S (Spansion). It loads to mcu special program, which init SPI Interface and using SPIFI lib write to external flash. After that, internal flash is programming. It's clear.

    But I need to program it without any external IDE, only with using J-Link and Segger software. It seems to be a quite difficult, because Keil makes this with FlashOS and SPIFI lib, in a non transparent way. In Flash Programming Algorithm memory map, it is a few function which doesnt exist in this workspace files.

    Can I handle this with this connection and this Flash?
  • Hi,

    I will pass this question to my colleagues.
    First of all: Spansion S25FL128S is listed as a supported Flash: segger.com/jlink_supported_devices.html#SupportedSPIFlashes

    Could you please tell us which board / device you are referring to?
    Is the SPI Flash memory mapped readable through the CPU?

    Best regards,
    Niklas
    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,

    It is our board. As I wrote - with LPC1857.
    SPI Flash memory is readable through the mcu via Keil (mapped to 0x14000000 address), I can see what is inside memory in Keil.
    Through CPU (via J-Link+J-Flash) is not readable for me.


    To be clear : I developed project with Keil uVision, and it works fine (but slow - it's obvious). But now I need solution for "production programming".


    Best regards,
    Mariusz

    The post was edited 2 times, last by DCWR ().

  • Hi Mariusz,


    sorry, i missed the thread title.

    But I need to program it without any external IDE, only with using J-Link and Segger software.

    Should be possible by following these steps:

    Start J-Link Commander and select the correct device by for example using the command line arguments
    (example below) and load the data file into the SPIFI flash memory area which is at address 0x14000000

    Source Code

    1. JLink.exe -device LPC1857 -if SWD -speed 4000

    Now enter the commands below:

    Source Code

    1. r // reset the MCU to make sure it is in a defined state
    2. loadfile <filename> [<addr>] // loadfile C:\Work\Application.bin,0x14000000


    Best regards,
    Niklas
    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,


    I just saw your update:
    But now I need solution for "production programming".

    We do not recommend J-Link Commander for production purposes.
    Indirect (via MCU) Production-Grade Programming of (Q)SPI-Flashes via J-Flash will be available in a future version of J-Flash, which is scheduled for release in April/2016.

    Best regards,
    Niklas
    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.
  • Of course I tried this, it doesn't work.

    I forgot to explain something important :
    I use internal mcu flash to keep device firmware, external flash is only for graphics/fonts/audio. My final .hex has part for my mcu and part for external memory (it is a several MB).

    Best regards,
    Mariusz
  • Hi Maruiz,

    I just tested it, it works for me with a MCB1800/4300 eval board.
    Any idea on what could be different in the setup?
    Screenshot attached:


    Best regards,
    Niklas
    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.
  • Sorry for confusion.
    It works very well. It was my fault. I did setting J-Link wrong.
    As I told, Keil makes this in so complicated way. With J-Link and J-Flash it works very fast. I'm satisfied.

    Thanks for help.


    Best regards,
    Mariusz
  • I have one question.

    How it is possible, that Keil is doing this programming in winding way. Why they don't use J-Link to do it - I think with full hardware (maybe with software) support.

    Could you explain, how J-Link do it with details?
    I told him only (via J-Link Commander) the device - LPC1857 and loadfile (.hex) and without any problem it init chip, init flash to work like spi/quad spi and program all flash. He has to know all about LPC1857 e.g 0x1400 0000 address in my .hex it means : mapped memory->spifi->init interface... and so on . Impressive. :)

    Best regards,
    Mariusz

    The post was edited 1 time, last by DCWR ().