2024-02-01 02:40 PM
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.
Solved! Go to Solution.
2024-02-02 02:02 AM - edited 2024-02-02 02:02 AM
Hello @jflaxman and welcome to the ST Community :smiling_face_with_smiling_eyes:.
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.
2024-02-02 02:02 AM - edited 2024-02-02 02:02 AM
Hello @jflaxman and welcome to the ST Community :smiling_face_with_smiling_eyes:.
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.
2024-02-02 10:15 AM
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.
2024-02-02 10:28 AM
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.