How to reset P2
David Betz
Posts: 14,516
How do I cause the P2 to reboot programmatically? I'm working on code to boot a large program from flash and I'd like to force a reboot after writing the flash. What's the best way to cause the P2 to reboot?
Comments
That example come from Chip.
In dump that address starts with Long - 0
But I have not looked yet why Chip starts at this point.
Thanks again! I guess I wouldn't have thought of using CLKSET to do a reset. From what you list it sounds like this will reset the P2: Does that sound right?
Sorry, I guess it has to be this:
Anyway, CLKSET works fine and so does my flash loader test! Thanks!!
In Yours example You will reset it to
>
Because the the clock register is cleared to % 0_0000_00_00 on reset, the chip starts up in RCFAST mode
with both the crystal oscillator and the PLL disabled.
You need in same time set other value3s to what You want.
I've pushed the propeller-load changes. You can now use the propeller-load -e option to write a program to the flash and have it boot on reset. We still don't have support for XMM mode yet though so you're limited to COG, LMM, or CMM programs at the moment. However, your LMM or CMM program can use all of the 126k of hub memory.