LPC54102 Debug M0+ Error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC54102 Debug M0+ Error

跳至解决方案
1,220 次查看
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

标签 (2)
1 解答
819 次查看
thefallguy
Contributor IV

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

在原帖中查看解决方案

5 回复数
819 次查看
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

819 次查看
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.

819 次查看
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 项奖励
819 次查看
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.

820 次查看
thefallguy
Contributor IV

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