Writing Interrupt Service Routines For MC56F84789

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

Writing Interrupt Service Routines For MC56F84789

Jump to solution
1,065 Views
marcos1
Contributor II

Previously I have worked with an 8-bit MCU (MC9S08QE128) where it seems very simple to implement ISRs.

You would define a function like this, where 22 is the interrupt vector number:

 

   interrupt 22 void intSW1(void)

   {

      (...)

   }

 

Is there a similar way to do this for DSCs?

When looking at the DSC (MC56F84789) the only documentation I can find refers to tools like "Processor Expert" or a "Quick Start Tool".

 

Do I really need to learn how to use a GUI tool in order to write an ISR?

Labels (1)
0 Kudos
1 Solution
743 Views
johnlwinters
NXP Employee
NXP Employee

Processor Expert generates code you can read.

You can use this code as example.

The PE project I generated was just a timer interrupt.

You can unzip and import this project into CW10.6, or just look at the files.

It shows you how to write ISR routines.

Look in the generated code directory for the code that PE generates to support the timer interrupt.

Please post an emai address and I will mail it to you, if you are interested.

View solution in original post

0 Kudos
5 Replies
743 Views
HumbertoOrnelas
Contributor I

Hi John,

Could you send me the proyect you are talking about, to see the use of ISR.

my email is: humberto.ornelas@pouncecorp.com

Thanks.

0 Kudos
743 Views
johnlwinters
NXP Employee
NXP Employee

Hi,

The Processor Expert tool is intuitive.

You add components.

Components have methods, properties, and events.

Events are the interrupts.

The interrupt handlers are already written for you.

You just write your code where the system indicates it should be inserted.

You can make a project to blink an LED every 100mS, for example, by just a few clicks and drags.

0 Kudos
743 Views
marcos1
Contributor II

Just to make sure, you are saying the method of using the keyword "interrupt" before a function cannot be used, but I have to use the Processor Expert tool?

Correct?

As far as intuitive goes, I'm not so sure.

I have created the project without Processor Expert and now all I can do is "Show Views" in the "Processor Expert" menu.  Clicking on anything in the components library shown has no effect.

I'll probably have to read about it first.

0 Kudos
744 Views
johnlwinters
NXP Employee
NXP Employee

Processor Expert generates code you can read.

You can use this code as example.

The PE project I generated was just a timer interrupt.

You can unzip and import this project into CW10.6, or just look at the files.

It shows you how to write ISR routines.

Look in the generated code directory for the code that PE generates to support the timer interrupt.

Please post an emai address and I will mail it to you, if you are interested.

0 Kudos
743 Views
marcos1
Contributor II

The eval board came with examples using Processor Expert on the DVD.

I will take a look at those for now.

Thanks.

0 Kudos