LPC54102 Debug M0+ Error

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

LPC54102 Debug M0+ Error

Jump to solution
1,192 Views
simonwyss
Contributor III

Working with the LPC54102 Development Board OM13077 I want to debug the M0+ core.

I have set up a new M0+ only project. Building and flashing works. But debuging does not work.

The LPCXpresso IDE stops on "Opening flash driver C:\nxp ..."

If I instead set up a M4 core only project, then the debuging works.

What do I have to change to get the M0+ only project debuging working?

Error: 15: Target error from Commit Flash write: Ef(34): Timed-out initializing flash.

Printscreens:

pastedImage_1.png

pastedImage_2.png

Thank you for your help.

Kind regards,

Simon

Labels (2)
1 Solution
791 Views
thefallguy
Contributor IV

BTW: I think I understand why your 'M0+' application runs. It is because the M4 that is running the M0+ code.

View solution in original post

5 Replies
791 Views
lpcxpresso_supp
NXP Employee
NXP Employee

As Fall Guy says, you can't have a standalone M0+ app on the LPC541xx family parts - you have to have a master M4 application that starts the M0+ cpu running. For more details, see the FAQ : LPC541xx Cortex-M4 / M0+ Multicore Applications 

Regards,

LPCXpresso Support

791 Views
thefallguy
Contributor IV

AFAIK, you cannot have an M0+ only project as the M0+ must be 'booted' by the M4. From reset, the M4 boots from flash and the M0+ is held in reset. Typically, the M4 then boots the M0+ (writing it start address to a register and then taking it out of reset). So, as a minimum your app will need a small piece of M4 code to boot them M0 and then put itself to sleep.

Look at the dual-core examples to see how to boot the M0+ from the M4.

791 Views
simonwyss
Contributor III

Thank you for your answer.

To clarify, I set up a new project with "File, New, Project, LPCXpresso C Project, LPC54100, LPC5410x (M0+).

I can build and flash this project without problem, but not debug. So I do not understand, why the startup after flashing works, where it will not work with the debugger. 

Your mentioned minimal piece of M4 code has to be there already because the M0 code works after normal flashing (not debugging).

Setup of M0+ Project (flashing works, debug not):
pastedImage_1.png

Setup of M4 Project (flashing works, debug WORKS also):

pastedImage_2.png

0 Kudos
791 Views
thefallguy
Contributor IV

I suggest you read Section 4.5.47 of the User Manual (UM10850). And then download, read and understand the Dual processor example from the LPCOpen examples.

792 Views
thefallguy
Contributor IV

BTW: I think I understand why your 'M0+' application runs. It is because the M4 that is running the M0+ code.