Query related to ISR - MCF5282 Coldfire

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

Query related to ISR - MCF5282 Coldfire

2,557 Views
Chandrashekar
Contributor I
I am writing Interrupt service routine to handle UART0 interrupt,
i want to know how i can map my ISR into the interrupt vector table, so that
when UART0 interrupt occurs it should execute my ISR.
Can anybody suggest me what are all the things i should configure for this
(i.e enabling/disabling some bits in SFR's and the files involved to do this like vector.s and so on),
I went thro' the Users manual of MCF5282, but i am little bit confused about
configuring my routine,
 
If there's any example about ISR mapping to Vector table it would be helpful.
 
Regards,
Manjunath Chandrashekar
Labels (1)
0 Kudos
2 Replies

540 Views
airswit
Contributor III
well, you have to set up the interrupt controller module:

set up the IMR bit for UART0
set up the ICR register for UART0
and, if you are using codewarrior and the include files from freescale, the mcf5xxx_set_handler() function should be available to use.

You also need to set up the uart module to enable interrupts, i believe.

hope some of that helps,
Trevor
0 Kudos

540 Views
Chandrashekar
Contributor I
Hello,
Thank you for the information and i need few more clarifications from you,
i am currently using MCF5282LITE EVB board and unable to find the necessary
include files from Freescale(as stated by you).
 
I configured the ICR and IMR as suggested by you and
I am calling the below function in my application
setup_handler(64 + 13);//For UART0 
 
but the interrupt is not getting invoked, i don't know what's wrong with my code.
 
 
void setup_handler(unsigned short vec_index)
{
 unsigned long **autovector = (unsigned long **)0x20000000;  // The Vector Base Address 
 *(autovector + vec_index)  = (unsigned long *) &SCI1_tx_ISR; 
}
 
Actually i am using vector.s, int_handlers.c files for handling interrupts,
 
 
 
can you guide me how to go about it,
if i get those include files to be used, it would be helpful.
 
Regards,
Chandrashekar
0 Kudos