Starting a COG with PASM
dr hydra
Posts: 212
Does anyone have an example where they have started a new COG in PASM replacing SPIN in COG zero...so that all eight COGS could/would being running PASM.
Comments
It's well described in the propeller manual. COGINIT is your friend.
Create a long variable where you clear the "NEW"-bit, set the COG bits to 000, set the address of the PAR register and the address where to find the code in HUB RAM. Then call COGINIT where the address of this long is given.
Just thinking out loud here, have you considered that your program may be started in a cog different from #0? In this case you'd run into trouble with hardwiring cog 0 as being (re)started last. Letting the main cog restart itself would avoid that issue.