Skip to main content
nooshin_1382
Associate III
January 12, 2015
Question

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

  • January 12, 2015
  • 1 reply
  • 606 views
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 topic has been closed for replies.

    1 reply

    Erwan YVIN
    ST Technical Moderator
    January 16, 2015
    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
    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.