The demo code was written for the p33FJ256GP710, and now you are using a different processor. Have you check to see if the peripherals used on the original processor exist on your processor?
At a guess I would say that the p33 has a different set of register names. You might find that the timer being used does not exist on your processor, so you will need to re-write the code to use whatever timer exists on your processor.
Although Microchip are very good at re-using peripherals across different processor types, at the end of the day the two processors are different and you cannot expect them to have the same peripherals, or use the same register names.
You are not the first to find this - I come across it all the time!
On some processors Microchip doesn’t define those individual bits of the timer control register. They do define at TCLK_PS field that has both of these bits, so you need to change the two statements into one that set them together.
Thank You for your earlier posts. They turned out to be quite helpful.
Going down the line, I encountered this error in case of DSPIC p33f3011:
**…\…\source\portable\MemMang\heap_1.o: Link Error: Could not allocate section .nbss, size = 5122 bytes, attributes = bss near
Link Error: Could not allocate data memory**
I tried configuring the port for DSPIC p30f6010/6011, but again, I faced this error.
Can you kindly help?
If you want to use a processor with only 1k, you are going to need to be very careful how you allocate it. It looks like you have heap1 set up to use 5k for the RTOS heap, which is more memory than you have.