How does the M4F core boot the M0+ core

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

How does the M4F core boot the M0+ core

Jump to solution
731 Views
da_chen
Contributor II

Since there are 2 cores in LPC54114, I want to know how the M4 boot the M0 core in the chip. Every documents I found did not say anything specifically about this step.

Besides, I am using LPCOpen library, when I try to open the function:

Chip_CPU_CM0Boot( uint32_t *coentry uint32_t *costackptr)

I can only find the declaration in the header file. I don't know its implementation. Where can  I find it?

Labels (1)
0 Kudos
1 Solution
596 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Chen,

Chip_CPU_CM0Boot() is defined in library file syscon_5411x.c. The function of it is to setup M0+ boot (Set up M0+ stack and boot location) and reset M0+ core. I extract them as below:

/* Setup M0+ boot and reset M0+ core */
void Chip_CPU_CM0Boot(uint32_t *coentry, uint32_t *costackptr)
{
#define M0_STACK_REG  (*(volatile uint32_t *)
    uint32_t temp;

    /* Setup M0+ stack and M0+ boot location */
    LPC_SYSCON->CPSTACK = (uint32_t) costackptr;
    LPC_SYSCON->CPBOOT =  (uint32_t) coentry;

    temp = LPC_SYSCON->CPUCTRL | CPUCTRL_SETMASK | MC_CM0_CLK_ENABLE;

    /* Enable M0+ clocking with reset asserted */
    LPC_SYSCON->CPUCTRL = temp | MC_CM0_RESET_ENABLE;

    /* De-assert reset on M0+ */
    LPC_SYSCON->CPUCTRL = temp;
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
3 Replies
596 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Chen,

What do you mean "wake up M0+ core"? do you mean boot M0+ core from M4 core ?

or

M0+ core is in low power mode, you need wake it up?

Have a nice day,

Jun Zhang

0 Kudos
596 Views
da_chen
Contributor II

I mean boot M0+ core. I've change the description of the question. Thx.

0 Kudos
597 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Chen,

Chip_CPU_CM0Boot() is defined in library file syscon_5411x.c. The function of it is to setup M0+ boot (Set up M0+ stack and boot location) and reset M0+ core. I extract them as below:

/* Setup M0+ boot and reset M0+ core */
void Chip_CPU_CM0Boot(uint32_t *coentry, uint32_t *costackptr)
{
#define M0_STACK_REG  (*(volatile uint32_t *)
    uint32_t temp;

    /* Setup M0+ stack and M0+ boot location */
    LPC_SYSCON->CPSTACK = (uint32_t) costackptr;
    LPC_SYSCON->CPBOOT =  (uint32_t) coentry;

    temp = LPC_SYSCON->CPUCTRL | CPUCTRL_SETMASK | MC_CM0_CLK_ENABLE;

    /* Enable M0+ clocking with reset asserted */
    LPC_SYSCON->CPUCTRL = temp | MC_CM0_RESET_ENABLE;

    /* De-assert reset on M0+ */
    LPC_SYSCON->CPUCTRL = temp;
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos