Page 1 of 1

Send a message via serial driver within SysTick handler

Posted: Thu Feb 25, 2016 3:28 pm
by neums
Hi,
in my application the SysTick handler checks an error condition on which the controller runs into an endless loop and waits for the watchdog to reset. In the error case i want to send an error message via the serial driver with sdWrite. The problem i see is that at this point of time the controller is in the SysTick Interrupt state which is high priorised. So the serial driver can not send the data because it is block by the SysTick handler. Is this right so far?

Is there a way to use the SysTick and send a serial message within the SysTick handler via the serial driver? Is it possible to decreased the SysTick priority within the SysTick handler?

Or do i have to use a GPT as system tick to have a lower priority?

Thanks

Re: Send a message via serial driver within SysTick handler

Posted: Thu Feb 25, 2016 4:43 pm
by Giovanni
Serial driver functions cannot be called by ISR context, you have 2 possible solutions:

1) Use a thread for I/O and wakeup it from your ISRs.

2) Use the UART driver that also has I-class functions.

Giovanni