cancel
Showing results for 
Search instead for 
Did you mean: 

How Can Use interrupt for serial or spi or can in SPC-studio

nooshin_1382
Associate II
Posted on January 12, 2015 at 10:19

Hello

I want to use interrupts for my ports but i do'nt know how can i use

is there a document or sample code is exist for this item .

actually i saw a OSAL_IRQ_HANDLER function but i do'nt how can i use this functoin in my code.

thanks for help

best regards.
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
Erwan YVIN
ST Employee
Posted on January 16, 2015 at 14:51

Hello Vanima ,

sorry for the late answer. From serial_lld.c , here is an example to define an interruption with your own vector (Serial)

#define SPC5_LINFLEX0_RXI_HANDLER vector79
.............
/**
* @brief LINFlex-0 RXI interrupt handler.
*
* @isr
*/
OSAL_IRQ_HANDLER(SPC5_LINFLEX0_RXI_HANDLER) {
OSAL_IRQ_PROLOGUE();
 ....................
OSAL_IRQ_EPILOGUE();
}

With patch mode feature , you can update this file or hook this part of code. See the reference manual , for the information on the interrupts. Best Regards Erwan