freeRTOS dsPIC demo shuts down after 2 mins

johnbaker10 wrote on Monday, August 31, 2009:

The dsPIC demo shuts down after about 2 minutes and 20 seconds. No error messages, just the message on the LCD screen every 20 seconds: "80 ns max jitter." Is this shutdown to be expected and should the jitter update be every 20 secs?

Also I can’t find where ulBaudRate is defined. Any ideas?

davedoors wrote on Monday, August 31, 2009:

I don’t know what you mean by shuts down, but the best thing you can do is stop it on the debugger to see what it is doing. The standard demo applications normally write to the lcd ever 3 or 5 seconds.

johnbaker10 wrote on Monday, August 31, 2009:

I mean that the demo appears to stop and reverts to the stop condition, waiting for me to click the start arrow. Then I can click the start arrow and restart the demo app. Then after another 2 mins and 20 secs, the demo stops running and again reverts to the stop condition, awaiting the start arrow to be clicked.

Yes, I had expected the LCD to be updated every 4 seconds but I see it being updated every 20 seconds with the 80 ns max jitter message updating every 20 seconds, alternating to the top and bottom lines. So it appears to me that it’s updating at 1/5 the expected rate.


rtel wrote on Monday, August 31, 2009:

Could it just be that you have the configuration fuses set incorrectly?  The PIC24 demo is configured to allow the MPLAB IDE setup the fuses.  If you have turned that off or changed the configuration it might not execute at the correct speed.


johnbaker10 wrote on Monday, August 31, 2009:

Yes, Richard, that’s at least part of the problem. The config bits were set wrong with the primary oscillator turned off. I wasn’t aware of these settings, instead expecting some board jumpers. So hopefully that will fix the 1/5 speed problem but I haven’t had a chance to see if the demo shuts down after X seconds. Would the oscillator setting affect that too, or just speed up the shutdown?


johnbaker10 wrote on Tuesday, September 01, 2009:

My problems with the dsPIC shut-down in 2-1/3 minutes and the low-speed operation are now corrected. The shut-down problem was from the WatchDog timer and low-speed was an incorrect oscillator, both from faulty settings of the configuration bits. So it looks promising now but have to get the serial I/O working next.

Thanks for the suggestions Dave and Richard!