MPLAB RTOSDemo_PIC24

ady001 wrote on Monday, April 25, 2016:

The project builds and executes; the LCD shows text, the LEDs flash etc. but after 2mins and 20s the program always resets ( emulator stops with the PC pointing at the reset vector ). I’m using the standard Microchip Explorer 16 Development Board.

The project was missing the define below which I took from the Visual Studio demo example, otherwise the project is completely unaltered.

define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )

I don’t have a loop back connected on the serial port so the LCD shows “FAIL #2” but I don’t believe this should cause the rpogram to reset. In fact all of the demo taks from main can be commented and the program still resets.

Maybe the watchdog is enabled but not serviced.

rtel wrote on Monday, April 25, 2016:

Maybe the watchdog is enabled but not serviced.

That would be the first thing to check then.

ady001 wrote on Monday, April 25, 2016:

Thanks for your friendly reply :slight_smile:
I guess I’m trying to point out that your standard demo code fails and you might want to correct it ( watchdog and missing define ) so that other people have a better first experience of FreeRTOS ?

rtel wrote on Monday, April 25, 2016:

I will give it a try before the final v9 release. What was the part
number of the PIC24 you were using?

ady001 wrote on Monday, April 25, 2016:

Disabling the watchdog seems to fix it
_CONFIG1(FWDTEN_OFF)
The part on the baord is a PIC24FJ128GA010.

Do you happen to know if this FreeRTOS port will work for a PIC24FJ128GA306 ?

rtel wrote on Monday, April 25, 2016:

I’m not aware of any reason why it wouldn’t work with the PIC24FJ128GA306.