2025-06-20 5:26 AM - last edited on 2025-08-05 1:45 AM by STTwo-32
I am working on stm32wl5moc controller and lora tx is not working
every time radio status i am getting back is 5 instead of 6, below is the code snipet, and also check the full code attached with this post
if (HAL_SUBGHZ_ExecGetCmd(&hsubghz, RADIO_GET_STATUS, &RadioResult, 1) != HAL_OK)
{
Error_Handler();
}
/* Format Mode and Status receive from SUBGHZ Radio */
RadioMode = ((RadioResult & RADIO_MODE_BITFIELD) >> 4);
RadioStatus = ((RadioResult & RADIO_STATUS_BITFIELD) >> 1);
if(RadioMode == RADIO_MODE_TX)
{
/* Wait end of transfer. SUBGHZ Radio go in Standby Mode */
do
{
/* Reset RadioResult */
RadioResult = 0x00;
/* Retrieve Status from SUBGHZ Radio */
if (HAL_SUBGHZ_ExecGetCmd(&hsubghz, RADIO_GET_STATUS, &RadioResult, 1) != HAL_OK)
{
Error_Handler();
}
/* Format Mode and Status receive from SUBGHZ Radio */
RadioMode = ((RadioResult & RADIO_MODE_BITFIELD) >> 4);
RadioStatus = ((RadioResult & RADIO_STATUS_BITFIELD) >> 1);
}
while (RadioMode != RADIO_MODE_STANDBY_RC);
}
else
{
/* Call Error Handler; LED1 blinking */
Error_Handler();
}
Edited to apply source code formatting - please see How to insert source code for future reference.
2025-08-05 6:06 AM
Hello @avinashkumar
Could you please add more details about your issue. you can also refer to the same tutorial i've mentioned on your last post.
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.