[C/C++] Reset Propeller via Software
DavidZemon
Posts: 2,973
I want to reset the Propeller via software only for the sake of a watchdog object. I know watchdogs are better implemented via R/C combination on the reset pin, but I think a software object would be nice way to learn about the concept without having to get out a breadboard. I'm sure others can think of reasons for software-only watchdogs.
Anyway, my question revolves around how to do a thorough reset of a C/C++ program on the Prop. Here's what I have so far:
But I don't think this resets either the heap or the stack, so the program might very well run out of memory pretty quick!
Anyway, my question revolves around how to do a thorough reset of a C/C++ program on the Prop. Here's what I have so far:
int currentCog = cogid(); for (int cog = 0; cog < 8; ++cog) { if (currentCog != cog) cogstop(cog); cognew(main); cogstop(currentCog); }
But I don't think this resets either the heap or the stack, so the program might very well run out of memory pretty quick!
Comments