how to setup Interrupt handler for UART0 for MCF5282 ColdFire Processor?

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

how to setup Interrupt handler for UART0 for MCF5282 ColdFire Processor?

2,374 Views
Chandrashekar
Contributor I
Hello All,
 
i am currently using MCF5282LITE EVB board and CodeWarrior IDE(Evaluation version) for development and debugging.
I am trying to use UART0 module in the interrupt mode:
 
I have configured the ICR and IMR as per the info given in User's manual and
I am calling the below function in my application
setup_handler(64 + 13);//For UART0 , 13 being the vector number 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, Guide me what are all the include files
from Freescale i should use to develop my code.
 
if i get those include files to be used, it would be helpful.
 
Regards,
Chandrashekar
Labels (1)
0 Kudos
1 Reply

704 Views
airswit
Contributor III
go to the product site, and download their hearder/example files:

http://www.freescale.com/files/netcomm/software/app_software/code_examples/MCF5282SC.zip

that should get you started. the way to set up interrupts with that code (assuming it is close to the mcf5213 includes) is the mcf5xxx_set_handler(vector#,function name) function.
0 Kudos