[SOLVED] Difficulty implementing Open Flashloader per wiki instructions

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

  • [SOLVED] Difficulty implementing Open Flashloader per wiki instructions

    I am using NXP’s MCUXpresso with a Segger Flasher ARM. The device is NXP's QN9080.

    The built-in FLASH erase & download support for the QN9080C seems to require that an external crystal is present on the device in addition to the internal oscillator. However I am actually using an external TXCO powered from a GPIO pin on the device. Now, I can power the TXCO externally to get my development rolling, but it would be useful to be able to run a little code (using the internal osc.) to configure the GPIO pin to power the TXCO prior to erasing or programming.

    The Open Flashloader mechanism would seem to be the place to do this. I have had partial success in following the detailed instructions in the Segger Wiki at wiki.segger.com/Open_Flashloader

    I am configuring and driving the appropriate GPIO pin in my Init(), and also disabling the watchdog there.

    My Init(), UnInit(), EraseSector() and ProgramPage() implementations all output a pattern on a GPIO pin so that I can unequivocally identify when they run.

    I have built and debugged my ELF file and modified the XML file as instructed in the wiki. So far so good…

    In MCUXpressso, The following three functions DO actually seem to work:

    GUI Flash Tool / Segger J-Link probes / Erase / Enable Erase All Flash Banks

    GUI Flash Tool / Segger J-Link probes / Erase / Erase (without Enable Erase All Flash Banks)

    GUI Flash Tool / Segger J-Link probes / Program

    … but only the FIRST one shows any evidence of my Flashloader ELF code actually running (Init, EraseSector, UnInit all run, in that order).
    This is an issue because, without Init(), powering the oscillator and disabling the watchdog does not happen

    So it seems to me that, for some reason, there are functions other than those mentioned in the wiki that need to be implemented. Can anyone shed any light on this situation, please?
  • Hello,

    I do not really understand the summary of what seems to actually working.
    How do you test your algorithm? Using MCUXpresso? If yes, please follow
    the provided troubleshoot instructions provided in the Open Flashloader wiki article.

    Troubleshoot
    This section provides assistance in case of issues pops up when using custom added flash bank. The section assumes that the functionality has been verified using the debug configuration in Embedded Studio.
    1. Get the latest version of the template project
    2. Follow the Step-By-Step instructions except of 1.2 FlashPrg.c --> Functions should not contain any code that accesses any SFRs
    3. Build the flash loader using the release configuration
    4. Perform a flash download using J-Link Commander. Flash download should report an error during verify
    5. Implement EraseSector() and retry the flash download test. J-Link Commander should still report verify failed but effected flash memory region should be empty. If not, check EraseSector().
    6. Implement ProgramPage() and retry the flash download test. Expected result: Test reports O.K. --> Programmed successfully. If not, check ProgramPage() code.


    Best regards
    Erik
    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.