Try different values. In particular, extreme ones (eg. 0, 1023 or close to that)
Now, every 100mSec I make a call to a TimerThree function, the PWM function, and this is where TCCR3A is able to be changed, as follows;
Well why do you call that every 100 mS? You don't need to change the period, do you? Only the duty cycle.
Something in your code, or in a library, is doing it. Possibly due to a buffer overrun somewhere
Does this code have interrupts?
Firstly, I have removed the TimerThree generated 100mSec interrupt used to call a routine.That interrupt has been replaced with a standard 100mSec millis() time check, which works fine.
For something that goes wrong very occasionally it sounds like a timing issue
is your theory that the PWM output will eventually stop?
can't get past the dreaded "sync" error.
For that matter just write 32 every time but record that the value was wrong.
smells of memory leaks