LPC11E35 1.8V HardFault just at debug start

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC11E35 1.8V HardFault just at debug start

1,114 Views
leg7911
Contributor II

Hello!
I'm fighting with LPC11E35
I've nerver such a problem with other LPCs, but I've never used them at 1.8v

I'v got hard fault just after starting the debug (via LPCLink LPC1768)
My target board runs at 1.8V so I'm using ST2378E (8-bit dual supply 1.71 to 5.5 V bidirectional level translator with 13Mbps guaranteed data rate)
Is it enough for SWD ?

Once or twice I've reached ResetISR where I'v put a brakpoint in first line(in dummy loop),
then I was able to go step by step.
But all other attempts just HardFault :>


I wonder what can be wrong
Any suggestions ?

#lpc11exx #lpc11e35 #1.8v#hardfault

Labels (1)
0 Kudos
7 Replies

953 Views
leg7911
Contributor II

Finally I've found reason :smileygrin: ... PLL (PLL itself or speed)!
Now I can debug running with IRC directly.
Is it written somewhere - the relation speed vs voltage ?

Second issue,
the moment I've switch to IRC (I disabled "CLOCK_SETUP" in "system_LPC11Exx.c")

I have no interrupt hit "I2C_IRQHandler" neither "SysTick_Handler", which was working with PLL.
What I missed ?

After a moment I've discovered it has exception (IPSR = 0x3 - Hard Fault) just from the beginning - first line of ResetISR.

0 Kudos

953 Views
lpcxpresso_supp
NXP Employee
NXP Employee

I seem to remember that the original LPC-Link probe did not support debug of targets below 3.3v. So I'm sort of surprised you have had any luck with this !

But that aside, exactly what part do you have on your board - and what MCU is selected in the Project properties for your projects?

Its possible if the MCU you have selected in the IDE and the part on your board don't match - then a difference in the layout / size of RAM available could be triggering the hard fault (due to the stack being placed in memory that doesn't actually exist on your hardware).

Regards,

MCUXpresso IDE Support

0 Kudos

953 Views
leg7911
Contributor II

As I wrote in first post - All connections (SWDIO, SWDCLK, RESET) are done via ST2378E (8-bit dual supply 1.71 to 5.5 V bidirectional level translator with 13Mbps guaranteed data rate).

Is this translator fast enough ? Or should use sth else ?

My IC is LPC11E35FHI33/501. In MCUXpresso is selected 11E35/501.

0 Kudos

953 Views
leg7911
Contributor II

There are two more strange issues.
1 - debugger doesn't hit main (it is checked in debug menu - i tried both with and w/o "force HW brakpoint")

Even if I setup breakpoint somewhere at the beginning it doesn't stop there.
I have to pause running program, put breakpoint - then it stops at the breakpoint after restarting

Any clue ?


2 - printf cause hard fault - it is set semihost in one place.

Project Properties ->c/c++ Build -> Settings ->Tool Settings ->MCU Linker -> Menaged Linker Scripts -> Library : Redlib (semihost)
Is there other places to set it ?

It was working when I create this project and it was "empty", and I was adding only my code which works. But whenever I use "printf" directly goes to hardfault.

0 Kudos

953 Views
leg7911
Contributor II

I've started next project, but this time using traditional CMSIS instead LPCOpen.
Easiest "while(1)" with printf via semihost at the beginning works now without any problem.
It seems that sth is wrong at creator when I choose lpc_chip_11uxx.lib. (it was pointed on this forum as a best match)
My preverious project/srce didnt get in to "ResetISR", and now changing library it works. So I gues lib isn't work well.

0 Kudos

953 Views
converse
Senior Contributor V

Possibly it is not supplying enough current to program the flash. Does the flash contain the values you expect?

0 Kudos

953 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi Grzegorz,

Could you try using other source code to test this? Maybe only the toggling a pin so you can be sure the software is not the problem. In the LCPOpen the one for the LPC11U35 should be compatible with this MCU.

Best Regards,

Alexis Andalon

0 Kudos