0

RTOS for #CircuitPython2022
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

RTOS for #CircuitPython2022

by mdroberts1243 on Fri Jan 21, 2022 7:13 pm

I imagine CircuitPython becoming a very easy way to create serious IoT sensor nodes. CP, with Adafruit sensor breakouts, could be used to code the sensor logic.

What I would like to see in #CircuitPython2022 is the ability to work over an RTOS, like FreeRTOS or Zephyr, so that a proper communications stack could be implemented in the background, transparent to the user. This has been successful in ESP series but I'd like to see STM32 or Nordic chips support the same.

For a specific example, think of LoRaWAN. Most aspects of LoRaWAN can be implemented with open source, but the LoRaWAN stacks for microcontrollers are not compliant with LoRa Alliance and deliver a very poor user experience compared to what is possible with LoRaWAN. An underlying RTOS will support implementing a proper, certifiable, stack for LoRaWAN (from FOSS) that will enable the full LoRaWAN functionality.

mdroberts1243
 
Posts: 11
Joined: Tue May 16, 2017 11:35 am

Re: RTOS for #CircuitPython2022

by tannewt on Fri Jan 21, 2022 8:55 pm

Is there a LoRaWAN stack built on top of FreeRTOS? My bias is to go that direction. Zephyr is just so gigantic.

tannewt
 
Posts: 2927
Joined: Thu Oct 06, 2016 8:48 pm

Re: RTOS for #CircuitPython2022

by mdroberts1243 on Fri Jan 21, 2022 9:41 pm

I would consider starting with the STM32WL reference design. Based on FOSS FreeRTOS, the whole stack is published, although the licensing terms need to be looked at closely. https://www.st.com/resource/en/user_man ... ronics.pdf

One interesting thing about the STM32WL stack is they have a Modem AT command interface, so easy partitioning of the lower-level MAC/Link Layer stuff on RTOS with higher level packet functionality in CircuitPython so it could be adapted to the situation.

Semtech also publishes their stacks and commonly uses STM processors for their reference designs and external transceiver chips. Not sure about FreeRTOS in that case, but doable I'm sure.

mdroberts1243
 
Posts: 11
Joined: Tue May 16, 2017 11:35 am

Re: RTOS for #CircuitPython2022

by tannewt on Mon Jan 24, 2022 6:22 pm

Thanks for the info! I think we'd need to check the files themselves. The datasheet says "The middleware stacks LoRaWAN® and SubGHz_Phy made by Semtech and STMicroelectronics are distributed under a non-restrictive BSD (berkeley software distribution) license." It's a good lead for the long term.

I doubt any of us Adafruit-funded folks will work on STM32 though due to low chip availability.

tannewt
 
Posts: 2927
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.