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:
void Chip_CPU_CM0Boot(uint32_t *coentry, uint32_t *costackptr)
{
#define M0_STACK_REG (*(volatile uint32_t *)
uint32_t temp;
LPC_SYSCON->CPSTACK = (uint32_t) costackptr;
LPC_SYSCON->CPBOOT = (uint32_t) coentry;
temp = LPC_SYSCON->CPUCTRL | CPUCTRL_SETMASK | MC_CM0_CLK_ENABLE;
LPC_SYSCON->CPUCTRL = temp | MC_CM0_RESET_ENABLE;
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.
-------------------------------------------------------------------------------