[SOLVED] Open Flashloader with User-Interrupt

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

  • [SOLVED] Open Flashloader with User-Interrupt

    We try to develop a flashloader for LPC1768 with ext. SPI Flash.
    "Data" -> J-Flash (on PC) -> J-Link -> LPC1768 -> ext. SPI Flash

    This project use CMSIS Driver and CMSIS uses SPI-Interrupt to communicate with ext. SPI-Flash.

    This works fine in debug.
    But in release, it can not jump into the interrupt function "void SSPx_IRQHandler (SSP_RESOURCES *ssp)"
    Because there is a LED Blinky in this Interrupt, and the LED never blinks. (But it blinks in debug)

    Is it possible, the J-Flash shut down the interrups by program/erase/read?
    How can I activate interrupt in Open Flashloader?
    ?(
  • Hi,

    flash loaders are and have ever been executed with interrupts disabled, for various reasons.

    What‘s the point in having interrupts in your loader?
    Makes the code more complicated, needs a vector table and the core cannot do anything else anyhow, while waiting for the interrupt.
    So just poll and you are good…
    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.
  • We use interrupts, because the CMSIS-Driver need it to send/receive data. And we want to use this CMSIS-Driver without any changes, in order to transplant this source to other Hardware(Microcontroller).

    If we debug the release-version, the interrupt function can be executed. It is ok!
    But if the JFlash uses the *.FLM from release-version to program/erase/read data, then the interrupt function is ignored.


    Maybe JFlash deactivates the interrupt at start process.
    But we already activate all needed interrupts manually in the
    "int Init(U32 Addr, U32 Freq, U32 Func) { }"
  • I repeat:
    Flash loaders are and have ever been executed with interrupts disabled.

    When executed inside J-Flash etc. a global „mask interrupts“ bit is set, so matter how often and where else you enable them,
    they won‘t make it through.

    You cannot use interrupts in flash loaders
    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.