I have a board with PIC32MX795F512L fitted, and am adding Microchips
I thus need to change the timer being used, as the MChip stack makes
extensive internal use of Timer1.
I know that this topic has been covered previously, by a Microchip App
Note and various forum posts here etc. but these are now quite old…
I currently have it (almost ??) working using Timer5, having modified
My board is however experiencing random ‘crashes’ and when I catch this
in the ‘general_exception_handler’, I see the core software interrupt
flag set - IFS1 = 2 - suggesting that this ‘might’ be related to
SO - I am guessing that my changes are not fully correct (although the
RTOS is working, task switching etc.).
I just installed XC32 V1.22 (was using V1.21 until this morning) - which
made no noticeable difference - although there are notes referring to
Interrupt level changes in this compiler !!.
I am using FreeRTOS V7.5.2 - but also see that a new FreeRTOS build
(7.5.3) is now available, and that the code in port.c has changed. Also
please refer to the forum discussion :
PIC32 - Using a different Timer
In this discussion it specifically mentions the change to use a new
#define _IFS0_T1IF_MASK in ‘vPortIncrementTick’.
So as I am now confused by the various historic posts etc. - could
someone please define the BEST steps now necessary to perform the Timer
change - using the current FreeRTOS. Seems to me not to be limited to
the interrupt handler but also to the initialisation routines and maybe
somewhere else ???
I am wondering if there is now a ‘standardised’ or ‘recommended’ method
to swap out the timer for Pic32 in FreeRTOS ?