We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 47c580b + 9fd3e09 commit 2454dc5Copy full SHA for 2454dc5
libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/us_ticker.c
@@ -68,8 +68,11 @@ void us_ticker_clear_interrupt(void) {
68
void us_ticker_set_interrupt(timestamp_t timestamp) {
69
int delta = (int)(timestamp - us_ticker_read());
70
if (delta <= 0) {
71
- // This event was in the past:
72
- us_ticker_irq_handler();
+ // This event was in the past.
+ // Set the interrupt as pending, but don't process it here.
73
+ // This prevents a recurive loop under heavy load
74
+ // which can lead to a stack overflow.
75
+ NVIC_SetPendingIRQ(PIT3_IRQn);
76
return;
77
}
78
0 commit comments