[SOLVED] JLink Script default actions for LPC4357

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

  • [SOLVED] JLink Script default actions for LPC4357

    Hello, is it possible to get examples of the default implementations of the following actions for the LPC4357?
    • void ResetTarget(void)
    • void SetupTarget(void)
    • void InitTarget(void
    • etc....

    The reason why I ask is that I'm developing a flashloader, and have experienced some strange behavior with IRQ's not firing after subsequent debug sessions (without disconnecting/reconnecting power on the board first, prior to each session). I'm wondering if my reset procedure does not have everything required to actually reset all peripherals properly, and would love to compare to someone else's ResetTarget routine, or the default one that supposedly does this.

    I have created a page on the LPCXpresso forums to see if anyone there had thoughts (search for: LPC4357 All Interrupts stop working in External RAM, requires power-off/on to work again). I think it might be worth asking in this forum as well, especially if I am not doing something properly in my ResetTarget routine.

    I have attached my script (ported from an example I found on these forums) which initializes SDRAM successfully with my JLink Ultra+ in LPCXpresso.
    Files
  • Hello,

    Thank you for your inquiry.
    The default ResetTarget sequence that J-Link executes for the LPC4357 is one of the most complex ones we had to implement.
    More than 8 different bootloader revisions need to be handled and many special steps are necessary.
    The source will not be published to protect our IP.

    The Scriptfile you are using overwrites the default sequence completely. We only recommend this if you are handling all necessary steps and know exactly what you are doing.
    Looking through your Script none of this steps are handled.

    Instead we recommend doing your Peripheral init using the SetupTarget() function instead of ResetTarget() in the Scriptfile.
    That way the default reset still gets handled correctly and extra init steps for your peripherals like SDRAM init get executed afterwards.
    More information can be found in the J-Link user manual.

    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.