Exception processing

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exception processing

1,413 Views
Iko
Contributor II

Hi hall.

I'm working on a MCF51AC256.

ColdFire V1.

 

I've just experience with HCS08 (DZ60). I have made a very small RT system on I.

On HSC08, If you put "asm CLI" in the ISR, you can "preempt" it (the isr can be interrupted).

 

On a Coldfire, the Exception processing is more complex and i have some difficulty to do what i want...

 

In my application:

- i only run as supervisor

- I just use module ISR (FTM, SCI...)

 

What must i do to be sure that one ISR, for exemple TMP3_OVF ,  can be interrupted by others ?

 

Thank's in advance for your reply.

Iko.

Labels (1)
0 Kudos
Reply
2 Replies

876 Views
TomE
Specialist II

> What must i do to be sure that one ISR, for exemple TMP3_OVF ,  can be interrupted by others ?

 

You're in luck. The Coldfire is very good at that. It uses different interrupt PRIORITIES, and higher level priority interrupts can interrupt the lower ones.

 

You have to enable the individual interrupts in the interrupt controller for all of your sources.

 

Then list your sources in priority order, and program them in the interrupt controller with levels 1 to 6.

 

You don't have to do anything else. The higher level ones will automatically interrupt the lower priority ones.

 

There's a fair bit of setting up the controllers. Download some samples and read them.

 

Read the WHOLE of the "Interrupt Controller Module" in the Reference Manual for the chip. I'm reading the MCF5329 manual, but they should all be similar.

 

The "Table of Interrupt Sources" is very important, especially the "Flag Clearing Mechanism" column. The first thing ewach of your interrupt service routines must do is the "flag clearing operation" for the particular source.

 

 

 

 

Read the

0 Kudos
Reply

876 Views
Iko
Contributor II

Hi TomE.

Tanks for this answer. this help me a lot!

I'll follow your tips.

 

Merci beaucoup (i'm french :smileywink: )

 

Iko

0 Kudos
Reply