2025-05-20 3:01 AM - last edited on 2025-05-20 3:30 AM by Andrew Neil
Hi There,
I am developing an RF link application where I need to transmit 64 bytes of data at 20-50 Hz over a range of 5-10m with some obstacles in the way. For robustness, I was looking at sub GHz devices, such as the STM32WL55. I purchased some NUCLEO-WL55JC1 for testing, and have been testing the example applications provided in the STM32Cube_FW_WL_V1.3.1, such as STM32Cube_FW_WL_V1.3.1\Projects\NUCLEO-WL55JC\Applications\SubGHz_Phy\SubGHz_Phy_LrFhss. However, the radio sending is far too slow for my application. I removed the dependancy on the sequencer and call Radio.Send from my main loop (see below). It takes 1900ms for the TX to be done, see screenshot below.
My question is can this chip even send 64 bytes at 20 Hz? Am I just using the wrong example code, or is this chip just designed for a different application than mine (much longer range, lower datarate) and I am wasting my time here? Thanks for taking the time to read this and I hope to hear from you soon :)
void my_app_loop(void)
{
while(1)
{
// APP_PRINTF("%u\r\n", (current_tick - previous_tick));
HAL_GPIO_TogglePin(LED1_GPIO_Port, LED1_Pin);
RadioTxDone_flag = 0;
if (Radio.Send(my_payload, payloadLen) == RADIO_STATUS_OK)
{
uint32_t radio_send_complete_tick = HAL_GetTick();
while(!RadioTxDone_flag) // Wait for tx to be complete
{
continue;
}
uint32_t radio_tx_done = HAL_GetTick();
APP_PRINTF("%u\r\n", (radio_tx_done - radio_send_complete_tick));
}
HAL_Delay(1000);
}
}
Edited to apply source code formatting - please see How to insert source code for future reference.
Solved! Go to Solution.
2025-05-21 6:31 AM
Hi all,
I have edited the Ping Pong example to suit my needs. In it, I can specify to use FSK modulation instead of LoRa, with the USE_MODEM_FSK flag. This provided the basic FSK setup and I could play with the FSK_FDEV, FSK_DATARATE, and FSK_BANDWIDTH to reach a payload data rate of 64 bytes at 20 Hz. Thank you all for your help!
2025-05-20 3:50 AM
I also attempted to run the STM32Cube_FW_WL_V1.3.1\Projects\NUCLEO-WL55JC\Demonstrations\LocalNetwork example but my two NUCLEO-WL55JC1 boards would not connect. I verified their RF connection does work as the ping pong example works perfectly.
2025-05-20 4:34 AM
Hello @angus123 and welcome to the ST Community.
As you can see on the product webpage, the STM32WL5 and the STM32WLE work on the frequency range of 150 MHz to 960 MHz. So, the 20-50 Hz is not covered by those products.
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.
2025-05-20 6:15 AM
Hi There, thanks for the reply!
I think you misunderstand my question. I want to send packets with 64 bytes of payload data 20 times per second, i.e. every 50 ms. The frequency used by the radio does not matter, as you say it is in the range of 150-960 MHz. The trouble I am running into is that the time it takes to send a 64-byte packet is around 1900ms, so far too slow for my needs. Is the SubGHz_Phy_LrFhss example what I should be using to try send data this frequently? Is it even possible with this chip?
2025-05-20 11:13 AM
Hi All,
This question has been escalated to our online support system for direct support. For support in the future, you can always submit questions directly to us at the my.st.com/ols website.
Regards,
Jake
ST Support
2025-05-20 11:39 AM
Yeah, you're going to have to pay attention to Bandwidth, Code Rate and Spreading Factor with LoRa
You'll need to use Semtech's calculator to plug in size and modulation settings to get an estimate of time-on-air and bitrates. Perhaps read the SX1262 data sheet, or related LoRa app notes.
Certainly possible to throw signals a few yards at 31kbps
If it's taking you 1900ms, you could probably pick that up a dozen kilo-metres away.
https://www.semtech.com/design-support/lora-calculator
https://calculator.semtech.com/
2025-05-20 12:18 PM
Hello @angus123
For the STM32WL55CC, according to the Table 30 of the Ds13293 Rev5, the maximum bitrate for LoRa modulation is 62.5 Kbits/s. So, to maximize the bitrate, you may try a LoRa example such as the SubGHz_Phy_PingPong example and set the minimum spreading factor with the maximum Bandwidth and codingrate.
I’ve escalated your request internally as said @Jacob WOODRUFF and my colleagues will Try to help you on your specific use case.
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.
2025-05-20 1:57 PM
Do you need to use LoRa at all ?
If you're just going a few dozen metres, it shouldn't be necessary ...
2025-05-21 12:30 AM
2025-05-21 12:40 AM
Hi Andrew,
I think you are correct that I don't need LoRa at all. Another dev kit I am testing is the SAMR30 Module Xplained Pro from Microchip, which is a sub-GHz MCU without LoRa. It was able to meet my requirements for 64 bytes at 20 Hz, however I would rather use an STM product to fit with my ecosystem.
The problem is I cannot find any example code or applications using the STM32WL without LoRA. I thought the SubGHz PHY examples sounded the most likely which is why I was trying these, but it seems like these still use LoRa. Would you be able to point me toward some examples using the STM32WL without LoRa?