Skip to main content
Associate
June 20, 2025
Question

lora tx problem using hal lib

  • June 20, 2025
  • 1 reply
  • 305 views

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.

1 reply

STTwo-32
Technical Moderator
August 5, 2025

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