2020-12-21 04:08 AM
Hi!
Basing on Ping-Pong example code from CubeIDE I made fw to test WMBUS protocol.
Generally works good, but I have some issues:
void SUBGRF_GetRxBufferStatus( uint8_t *payloadLength, uint8_t *rxStartBufferPointer )
{
uint8_t status[2];
if(SUBGRF_ReadCommand( RADIO_GET_RXBUFFERSTATUS, status, 2 ) == HAL_OK)
{}
// In case of LORA fixed header, the payloadLength is obtained by reading
// the register REG_LR_PAYLOADLENGTH
if( ( SUBGRF_GetPacketType( ) == PACKET_TYPE_LORA ) && ( LoRaHeaderType == LORA_PACKET_FIXED_LENGTH ) )
{
*payloadLength = SUBGRF_ReadRegister( REG_LR_PAYLOADLENGTH );
}
else
{
*payloadLength = status[0];
}
*rxStartBufferPointer = status[1];
}
I will be grateful for any help!