First, please check if the capacity of your event pool(s) is adequate. Perhaps simply increasing the number of events in the right event-pool will help.
But it is also possible to have a leak in your event-pool(s). For example, if you allocate some events with Q_NEW() or Q_NEW_X() but then don't post or publish some of them, those events will be leaked.
Another possibility of leaking events could be by using event deferral incorrectly.
Yet another possibility of leaking events could be by using Q_NEW_REF() incorrectly.
Please check all these possibilities.
--MMS
Last edit: Quantum Leaps 2020-07-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Miro, at some point, if you'd like me to transfer the freertos-esp32 port to you, just let me know. I have one active object working and will be adding more in the weeks ahead. I've had to make some changes. For example, since there are two cores the ApplicationTickHook gets called twice. I noticed the timers were running at double speed! I had to make the change below
/* Application hooks used in this project ==================================*//* NOTE: only the "FromISR" API variants are allowed in vApplicationTickHook */voidvApplicationTickHook(void) {
BaseType_txHigherPriorityTaskWoken=pdFALSE;staticint8_tcounter=0;//applicationtickhookiscalledbybothcoressoonlycallisrforeveryothercallif((counter++%2)==0) {
/* process time events for rate 0 */QF_TICK_X_FROM_ISR(0U, &xHigherPriorityTaskWoken, &l_TickHook);
}
#ifdefQ_SPY
{
tmp=SysTick->CTRL; /* clear SysTick_CTRL_COUNTFLAG */QS_tickTime_+=QS_tickPeriod_; /* account for the clock rollover */
}
#endif/* notify FreeRTOS to perform context switch from ISR, if needed */if(xHigherPriorityTaskWoken==pdTRUE) {
portYIELD_FROM_ISR();
}
//portEND_SWITCHING_ISR(xHigherPriorityTaskWoken); //only available in newer versions of FreeRTOS
}
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Andy,
I see some interest in ESP32 from the QP users, so I'd like to take you up on the offer of sending over your QP-ESP32 port. Could you please send it to info@state-machine.com? Thanks a lot!
--MMS
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Miro, can you point me to any resources or explain why I'm running out of free events?
First, please check if the capacity of your event pool(s) is adequate. Perhaps simply increasing the number of events in the right event-pool will help.
But it is also possible to have a leak in your event-pool(s). For example, if you allocate some events with
Q_NEW()
orQ_NEW_X()
but then don't post or publish some of them, those events will be leaked.Another possibility of leaking events could be by using event deferral incorrectly.
Yet another possibility of leaking events could be by using
Q_NEW_REF()
incorrectly.Please check all these possibilities.
--MMS
Last edit: Quantum Leaps 2020-07-25
Ah thanks, due to your comment I realized I was being silly and was allocating two QEvt.
Miro, at some point, if you'd like me to transfer the freertos-esp32 port to you, just let me know. I have one active object working and will be adding more in the weeks ahead. I've had to make some changes. For example, since there are two cores the ApplicationTickHook gets called twice. I noticed the timers were running at double speed! I had to make the change below
Hi Andy,
I see some interest in ESP32 from the QP users, so I'd like to take you up on the offer of sending over your QP-ESP32 port. Could you please send it to info@state-machine.com? Thanks a lot!
--MMS
Hi, Andy, how are you?
Ccould you share your dpp project?
Thanks.