Nevermind about the reinit issues. I suspected the same lethargy problem I was seeing previously was causing the call to get_pid(PID_SUPPORT00...) to fail, and that proved to be the case. Adding a retry loop in check_supported_pids() to this call resolved my issue.
Code:
void check_supported_pids(void)
{
char str[STRLEN];
#ifdef DEBUG
pid01to20_support=0xBE1FA812;
#else
byte i=0; << ADDED
while (i<3 && !pid01to20_support) << ADDED
{ << ADDED
i++; << ADDED
pid01to20_support = (get_pid(PID_SUPPORT00, false, str, &tempLong)) ? tempLong : 0;
} << ADDED
#endif
Also, my statement about 300ms working for time between init sequences doesn't seem to stand in re-init.
EDIT: Actually, this works better because the pid01to20_support doesn't need to be zeroed out.
Code:
byte i=0;
do
{
i++;
pid01to20_support = (get_pid(PID_SUPPORT00, false, str, &tempLong)) ? tempLong : 0;
} while (i<3 && !pid01to20_support);