interrupts in debugger

Beta Testing discussion on mikroPascal PRO for PIC32.
Post Reply
Author
Message
jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

interrupts in debugger

#1 Post by jpc » 02 Feb 2011 23:31

first evening with this new compiler immediately gave me the trusted feel, for a very first beta-release it seems to behave pretty well.
i noticed some error in the debugger, when i try to show only the used interrupt-vectors i get a strange mix of the few i had created and quite a few others. A closer look in the definitionfile shows all the shown 'used interrupts' to have the same vector so probably these are not yet all ok. The debugger btw jumps to the right one but that is probably sheer luck as this is the only interrupt that has an isr declared in the code.
The interrupt-assistant looks usefull btw.
I am looking forward to use more than 2k btw, this allows just for some basic testing.
Au royaume des aveugles, les borgnes sont rois.

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

Re: interrupts in debugger

#2 Post by jpc » 02 Feb 2011 23:52

after changing the pic from 32mx775f512h to 32mx340f512h this issue is gone, the definitionfile for the 32mx775f512h (possibly others) is not yet ok.
Au royaume des aveugles, les borgnes sont rois.

User avatar
srdjan
mikroElektronika team
Posts: 1552
Joined: 28 Dec 2005 12:47
Location: Serbia

Re: interrupts in debugger

#3 Post by srdjan » 03 Feb 2011 00:19

Hallo,
Unfortunately, it's not definition file error :)
MCUs with large number of interrupt sources have couple interrupt sources multiplexed at the same interrupt vector number.
By defining an interrupt handler for a such interrupt vector, you are practically defining handler for all multiplexed interrupt sources. So, if you have enabled more than one of the multiplexed interrupt sources, you will have to check which one caused the interrupt in order to handle the right one (pretty much like with 8bit PIC MCUs).

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

Re: interrupts in debugger

#4 Post by jpc » 03 Feb 2011 09:23

thanks for the explanation, i realize now that i had a rather unfortunate choice there as all interrupts of uart1 share the same vector together with those from SPI1 and I2C1 , in fact quite a mess but that is not your fault.
It also has for consequence that we cannot define independent ISR's for these, maybe the code-assistant in the future should warn for this, currently it will result in a Interrupt handler redefined error which is obvious now.
Au royaume des aveugles, les borgnes sont rois.

Post Reply

Return to “mikroPascal PRO for PIC32 Beta Testing”