Page 1 of 1

Cannot use STM32FreeRTOS with STM32duinoBLE

Posted: Mon Nov 13, 2023 11:49 pm
by jayadamsmorgan
I created an issue on GitHub about my problem: https://github.com/stm32duino/STM32duinoBLE/issues/63

Shortly, whenever I try to even include STM32FreeRTOS.h into my sketch that uses STM32duinoBLE, it hangs on BLE.begin(). I use P-Nucleo WB32 board. Have no idea why that happens, maybe someone here can help me with that. Thank you in advance.

Re: Cannot use STM32FreeRTOS with STM32duinoBLE

Posted: Tue Nov 14, 2023 9:00 am
by fpiSTM
Hi @jayadamsmorgan
Answered on the GH issue.

Re: Cannot use STM32FreeRTOS with STM32duinoBLE

Posted: Tue Nov 14, 2023 11:18 am
by ag123
for those who may be interested
i've got this so called 'A stm32duino event loop'
https://github.com/ag88/stm32duino-eventloop

it is original build around libmaple core (https://github.com/rogerclarkmelbourne/Arduino_STM32), but that it would likely 'just works' on STM core (https://github.com/stm32duino/Arduino_Core_STM32).

For those who have done some 'windows' programming or as like NodeJS (Javascript), this is an *event loop* that is run off the

Code: Select all

void loop() {
...
}
loop. With this model, write and register 'event handlers', which gets called from void loop() and process the events. It is a kind of 'co-operative multitasking' which avoids the (sys)tick based context switching as is done from various RTOS.

e.g. loop() calls your event handler, your event handler process that event, and return, loop() calls another event handler etc. And it maintain an event queue which can be used to pass messages / events to other event handlers. this concept 'really works' but is async.