Skip to main content
olek
Associate
December 21, 2020
Question

[STM32WLE5] RX buffer

  • December 21, 2020
  • 0 replies
  • 1012 views

Hi!

Basing on Ping-Pong example code from CubeIDE I made fw to test WMBUS protocol.

Generally works good, but I have some issues:

  1. After transmitting data the size of RX buffer is set to size of last transmitted packet. So after transmission of short packet I receive only half of expected data. As I understood both buffers (RX and TX) are separated and can be configured independently. Is it something that needs to be configured every time I switch module to RX mode?
  2. Implementation of command Get_RxBufferStatus() (0x13) seems to be different than showed in manual. In the example code (and in the working device) I can't receive status byte showed in the manual. Is it bug/manual mistake or am I missing something?

0693W000006GTENQA4.jpg

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!

This topic has been closed for replies.