Stop core1

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Ana0211
Level 2
Level 2
10 likes given 5 replies posted 5 likes given

Hello,

Is there any function or any way to make sure that the core1 is stopped and no code is executing ? I would like to do this in order to write the PFLASH, from core0.

Thank you!

0 Likes
1 Solution
µC_Wrangler
Employee
Employee
50 solutions authored 100 sign-ins 25 likes received

See Table 294 CPU Power Management in the TC3xx manual (PMCSRy.REQSLP=1).

In practice, it's a little tricky, because if you have a CPU watchdog enabled, it will likely expire if you force a CPU to idle.  Also, any interrupts for a CPU will also wake it up.  To be absolutely safe, it's best to execute from RAM.

This could also be handled with a higher level software routine, where a CPU polls a flag, and then disables interrupts and enters a very small loop (to avoid accessing PFLASH), polling the flag until it's released by the CPU doing the programming.

View solution in original post

1 Reply
µC_Wrangler
Employee
Employee
50 solutions authored 100 sign-ins 25 likes received

See Table 294 CPU Power Management in the TC3xx manual (PMCSRy.REQSLP=1).

In practice, it's a little tricky, because if you have a CPU watchdog enabled, it will likely expire if you force a CPU to idle.  Also, any interrupts for a CPU will also wake it up.  To be absolutely safe, it's best to execute from RAM.

This could also be handled with a higher level software routine, where a CPU polls a flag, and then disables interrupts and enters a very small loop (to avoid accessing PFLASH), polling the flag until it's released by the CPU doing the programming.