Compiler generated interrupt preamble

General discussion on mikroBasic for AVR.
Post Reply
Author
Message
stevech
Posts: 38
Joined: 20 Aug 2007 16:47

Compiler generated interrupt preamble

#1 Post by stevech » 10 Dec 2007 07:01

The compiler's interrupt service function preamble has a CLI (and a matching SEI at the end). This seems incorrect. The global interrupts should remain on unless the interrupt function elects to disable. The interrupting device itself will not interrupt again, reentrantly.

All the other ASM and C code I've seen for AVRs does not put a CLI in any Interrupt handler. Doing so can disrupt the latency expected by some other interrupt handler.

JerryHRoss
Posts: 41
Joined: 31 Jan 2008 14:27

Compiler generated interrupt preamble

#2 Post by JerryHRoss » 31 Jan 2008 14:37

This is a bug!

There should be no CLI/SEI in the auto-generated interrupt routine. The AVR hardware takes care of that.

Depending on the hardware stack size and interrupt rate, it is possible to overflow the hardware stack by (incorrectly) re-enabling interrupts before executing the RETI.

stevech
Posts: 38
Joined: 20 Aug 2007 16:47

#3 Post by stevech » 02 Feb 2008 04:52

Anyone at mikroElektronika paying attention to the AVR product???

stevech
Posts: 38
Joined: 20 Aug 2007 16:47

#4 Post by stevech » 25 Feb 2008 19:54

BUMP

BUMP


woodfold
Posts: 9
Joined: 25 Jul 2008 02:35
Location: Greenville, NC

We're 3 versions behind.

#5 Post by woodfold » 05 Aug 2008 21:07

stevech wrote:Anyone at mikroElektronika paying attention to the AVR product???
I think they are all over at the PIC forums. I see that mikroBasic for PIC v7.0.0.2 has been released (2008-06-09). Yet we have v4.0.0.2

Why don't they either get us up to speed or drop it altogether. This teasing us along with "wait for new version" doesn't cut it.

I've signed up for the beta.

johankrava
Posts: 11
Joined: 11 Oct 2008 19:44

#6 Post by johankrava » 11 Oct 2008 19:51

Any news on this issue?
PopularMicrocontrollers.com - [url=http://popularmicrocontrollers.com/]AVR Microcontrollers[/url]

Post Reply

Return to “mikroBasic for AVR General”