Page 1 of 1

Interrupt request on STMF3

Posted: Wed May 28, 2014 10:02 am
by PhantomFav
Hi, i need to pilot the following interrupt request by the user button on a STMF3

Code: Select all

CH_IRQ_HANDLER(myIRQ) {
  CH_IRQ_PROLOGUE();
 
  /* Wakes up the thread.*/
  chSysLockFromIsr();
  if (tp != NULL) {
    tp->p_u.rdymsg = (msg_t)55;     /* Sending the message, optional.*/
    chSchReadyI(tp);
    tp = NULL;
  }
  chSysUnlockFromIsr().
 
  CH_IRQ_EPILOGUE();
}


how can i do this?

Re: Interrupt request on STMF3

Posted: Wed May 28, 2014 10:20 am
by Giovanni
Hi,

You don't need to use an ISR at all, you can use the EXT driver which can give you a callback on a front on any pin. See the examples under /testhal.

Giovanni

Re: Interrupt request on STMF3

Posted: Sat May 31, 2014 9:49 am
by PhantomFav
Thank you Giovanni for your reply, it's all what i need.