2023-01-26 08:01 AM
A packet with CRC error has both SUBGHZ_IT_RX_CPLT and SUBGHZ_IT_CRC_ERROR flag set.
In stm32wlxx_hal_subghz.c, this leads to both RxCpltCallback() and CRCErrorCallback() being called.
I believe that only CRCErrorCallback() should be called. That is what is done in the drivers provided by semtech for the sx126x:
https://github.com/Lora-net/LoRaMac-node/blob/master/src/radio/sx126x/radio.c#L1282
Solved! Go to Solution.
2023-01-30 01:36 AM
Hello @HugoL ,
Thank you for your message. You are right, you have to add a condition on the packet received interrupt to process the packet only if the CRC is valid :
if ((SUBGHZ_CHECK_IT_SOURCE(itsource, SUBGHZ_IT_RX_CPLT) != RESET) && (SUBGHZ_CHECK_IT_SOURCE(itsource, SUBGHZ_IT_CRC_ERROR) == RESET))
We will modify this on our side.
I hope this helped you.
Best regards
Louis
When your question is answered, you can close this topic by choosing Select as Best.
2023-01-30 01:36 AM
Hello @HugoL ,
Thank you for your message. You are right, you have to add a condition on the packet received interrupt to process the packet only if the CRC is valid :
if ((SUBGHZ_CHECK_IT_SOURCE(itsource, SUBGHZ_IT_RX_CPLT) != RESET) && (SUBGHZ_CHECK_IT_SOURCE(itsource, SUBGHZ_IT_CRC_ERROR) == RESET))
We will modify this on our side.
I hope this helped you.
Best regards
Louis
When your question is answered, you can close this topic by choosing Select as Best.