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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

2,525 次查看
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
标签 (1)
0 项奖励
回复
1 回复

855 次查看
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 项奖励
回复