Timer1 peripheral in software Debug

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
dyjt03
Posts: 11
Joined: 15 Dec 2015 06:28

Timer1 peripheral in software Debug

#1 Post by dyjt03 » 29 Jan 2021 03:47

Hello,

I've been trying to get timer1 interrupt running in pic32mx230f256b. However, (Software debug mode) stepping through code; TMR1 register wasn't updating.
I recheck all timer1 peripheral initialization
( T1Conbits. On = 1) register and found no problem.

So I decided to try and run another project example provided by mikroC pic32 folder:
C:\mikroc pro for Pic32\ Examples\ Internal MCU\ PIC32MZ2048EFH144\ Timer1 Interrupt\ Timer1 Interrupt. mcp32.

Again stepping through code with provided example in software debug mode, TMR1 register in watchlist still not updating when stepping through code.

Have anyone have tried stepping through the codes example with TMR1 register updating during software debug?. Thanks.

BTw I had ported the code in microchip XC32 with no problems in debug mode.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Timer1 peripheral in software Debug

#2 Post by filip » 01 Feb 2021 08:24

Hi,

The Software Simulator simulates the program flow and execution of instruction lines, but it cannot fully emulate device behavior, i.e. it doesn’t update timers, interrupt flags, etc.

I suggest you to use hardware debugger for this purpose.

Regards,
Filip.

Post Reply

Return to “mikroC PRO for PIC32 General”