Thursday, April 19th 2018, 3:17pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

brich1024

Beginner

Date of registration: Jun 9th 2016

Posts: 3

1

Wednesday, April 11th 2018, 7:10pm

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.
brich1024 has attached the following file:

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 931

2

Thursday, April 12th 2018, 3:09pm

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: Forum Rules

Keep in mind, this is not a support forum. Its main purposes is user to user interaction.
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 contact us per e-mail.
The following contact form can be used for this: https://www.segger.com/about-us/contact-us/