cancel
Showing results for 
Search instead for 
Did you mean: 

Multitasking radio and sensor reading task.

jflaxman
Associate

Hello,

 

I am currently building an application for the STM32WL. Two processes need to run simultaneously, the first is offline, and just reads data from a sensor and stores it in SD memory. The second is sending a LoRaWAN up-link message every 10 minutes (battery health monitor data). I am basing my project on the LoRaWAN_End_Node_DualCore_CM0PLUS project. I can see that the subghz radio runs on the CM0Plus, but the LoRaWAN network middleware files are on the CM4. 

 

In summary, I am wondering if it's possible to send an uplink message through the radio driver with the CM0 while reading data through I2C on the CM4. Is it possible to multitask like this?

 

Sorry for the beginner question. 

1 ACCEPTED SOLUTION

Accepted Solutions
STTwo-32
ST Employee

Hello @jflaxman and welcome to the ST Community 😊.

Both SUBGHZ_PHY and LORAWAN middleware are forced to use both Cortex-M4 and Cortex-M0+ contexts when working on a Dual Core LoRaWAN projects. So, The LoRawan tasks will use both cores. I suggest you try to configure your application using a FreeRTOS context for coordination between tasks (this example should help).

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
STTwo-32
ST Employee

Hello @jflaxman and welcome to the ST Community 😊.

Both SUBGHZ_PHY and LORAWAN middleware are forced to use both Cortex-M4 and Cortex-M0+ contexts when working on a Dual Core LoRaWAN projects. So, The LoRawan tasks will use both cores. I suggest you try to configure your application using a FreeRTOS context for coordination between tasks (this example should help).

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you very much for your reply. I think our best bet is to just add another chip to perform data logging, as it's completely independent of the radio transmission data. 

Hello again,


@jflaxman wrote:

I think our best bet is to just add another chip to perform data logging, as it's completely independent of the radio transmission data. 



It can be a good choice too. 

If your question is answered. please close the topic by choosing the answer to your question as solution (click on "Accept as Solution").

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.