[SOLVED] How J-FLASH configures its 'external loaders'?

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

  • [SOLVED] How J-FLASH configures its 'external loaders'?

    Dear experts,
    I'm new to J-FLASH and J-LINK. Please advise.

    A customer has a board with STM32F746 and QSPI flash.
    Their program has data in the QSPI flash, and they flash the app using J-LINK and J-Flash.

    Now, I cannot figure out how J-Flash deals with QSPI without "external loaders"?
    And programming the QSPI part of the data does not work for me.
    The internal flash part programs OK. Erase of the QSPI also looks OK. So I assume that J-LINK itself, cables, power are OK.
    The customer says they never had any issue with flashing. Just drop a file to it and it does its magic.
    Below is the only config dialog I could find related to the QSPI.
    What else is missing?




    Messages in the log window:


    Source Code

    1. - Start of determining flash info (Bank 2 @ 0x90000000)
    2. - End of determining flash info
    3. - Flash bank info:
    4. - 512 * 64 KB @ 0x90000000
    5. - Start of preparing flash programming
    6. - End of preparing flash programming
    7. - Start of determining dirty areas in flash cache
    8. - End of determining dirty areas
    9. - CPU speed could not be measured.
    10. - Start of flash programming
    11. - Programming range 0x90000000 - 0x9000FFFF ( 1 Sector, 64 KB)
    12. - Programming range 0x90010000 - 0x9001FFFF ( 1 Sector, 64 KB)
    13. - Programming range 0x90020000 - 0x9002FFFF ( 1 Sector, 64 KB)
    14. - ERROR: Programming failed @ address 0x90000000 (block verification error)
    15. - End of flash programming
    16. - ERROR: Program failed
    Display All
  • Hi,

    ddbug wrote:


    The customer says they never had any issue with flashing. Just drop a file to it and it does its magic.
    If it works for your customer, I recommend to get in touch with them first,
    making sure that you are using identical hardware, identical J-Flash versions, ..., identical setups in general.


    ddbug wrote:

    Now, I cannot figure out how J-Flash deals with QSPI without "external loaders"?
    To be honest, I have no idea what you are asking for here...


    BR
    Alex
    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.
  • Alex,
    The customer have sent me their .jflash file, but they have a different J-LINK variant. I have Plus and they Pro.
    Are these two variants different enough in the aspect of external flash programming?

    Notice that the flash bank #2 definition in the .jflash does not go to any details about the pin configuration of the STM32F746, its clock rate and even about the flash chip.
    J-Flash seems to detect all this alone. Is this correct?

    Btw, I don't believe that you are not familiar with the term "external flash loader". Perhaps it is called differently in German.

    Thanks,
    - dd
  • TL;DR the recent J-Flash versions (from 7.82) have a special way to handle QSPI flash:
    you need to specify the QSPI controller pins as the "loader name", for example "CLK@PB2_nCS@PB6_D0@PD11_D1@PD12_D2@PE2_D3@PD13".

    This means:
    CLK->PB2
    CS->PB6
    D0-3 -> PD11,PD12,PE2,PD13

    Alternative pinouts can be selected in drop-down list.
    Knowing the pinout, J-Flash sets up the QSPI controller and reads the flash ID and standard parameters table.
    This includes the erase block size, command codes, times etc.
    With this information it can automagically handle variety of flash chips.

    Older J-Flash versions (as my customer's 7.68) probably use some heuristic to detect the pinout, it luckily works on their board.
    Version 7.82 failed for me because of a bug; it has been fixed in 7.82e and now works fine (until the next bug, of course ;)

    So the good news is that the customer can install the latest J-Flash; the bad news is that they have to specify the obscure "loader name" which they weren't aware of.
  • We will close this thread then.

    PS:
    No, there was never any heuristics be used in older versions, to detect pinout. There was a fixed pinout assumed.


    BR
    Alex
    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.