how to use irq in ChibiOS?
Posted: Thu Jun 30, 2011 9:35 am
hi,
I write a irq service.Some code like:
CH_IRQ_HANDLER(USART1_IRQHandler) {
CH_IRQ_PROLOGUE();
some code;
CH_IRQ_EPILOGUE();
}
and I use following code to initiate IRQ in main program:
NVICEnableVector(USART1_IRQn,CORTEX_PRIORITY_MASK(1));//this function is defined in /os/ports/GCC/ARMCMx/nvic.h
but,when I have compiled,I cannot find the vector in the vector table of object code,following code is copy from ch.lss list file
80000d0: 08000160 .word 0x08000160
80000d4: 08000160 .word 0x08000160//here should be the entry of USART1_IRQ,but it is just an empty one.
80000d8: 08000160 .word 0x08000160
Anybody know how to use irq?
Thanks,
zhou,
I write a irq service.Some code like:
CH_IRQ_HANDLER(USART1_IRQHandler) {
CH_IRQ_PROLOGUE();
some code;
CH_IRQ_EPILOGUE();
}
and I use following code to initiate IRQ in main program:
NVICEnableVector(USART1_IRQn,CORTEX_PRIORITY_MASK(1));//this function is defined in /os/ports/GCC/ARMCMx/nvic.h
but,when I have compiled,I cannot find the vector in the vector table of object code,following code is copy from ch.lss list file
80000d0: 08000160 .word 0x08000160
80000d4: 08000160 .word 0x08000160//here should be the entry of USART1_IRQ,but it is just an empty one.
80000d8: 08000160 .word 0x08000160
Anybody know how to use irq?
Thanks,
zhou,