cancel
Showing results for 
Search instead for 
Did you mean: 

Get CRC Error after transmit

KimiHu
Associate

Hi all,

My application is showing below

Device(NUCLEO-WL55JC1 EVM) send data to Gateway --> wait 100msec --> enter receive to wait data from gateway. In my test, If data from gateway more then device. The device report CRC Error to application layer.

I reproduce similar problem with (sample code)

1. Import SubGHz_Phy_Per and build it as TX side

2. Use attachment as RX side

3. IF data data length less then 64. I will get IRQ_CRC_Error and OnRxDone at the same time

  

2 REPLIES 2
STTwo-32
ST Employee

Hello @KimiHu 

I suggest you to debug the RX project. this will help you locating the error source.

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.

Nicoletv
Associate

Hi,

I was facing a similar issue, with a CRC error during each transmission between two STM32WLE devices.

So, if it could help someone, here is what was the issue:  

The LowDatarateOptimize was set to auto on both board, but was somehow enabled on one board, and disabled on the second one.
Once enabled or disabled on both board, no more CRC error!

In the following function, the last line was only present on the FW of one side

Therefore, with the auto setting, I got on one side this LowDatarateOptimize disabled, and on the other one enabled.

 

static int32_t RadioSetTxGenericConfig( GenericModems_t modem, TxConfigGeneric_t* config, int8_t power, uint32_t timeout )
{
    ...
    case GENERIC_LORA:
        SubgRf.ModulationParams.PacketType = PACKET_TYPE_LORA;
        SubgRf.ModulationParams.Params.LoRa.SpreadingFactor = ( RadioLoRaSpreadingFactors_t ) config->lora.SpreadingFactor;
        SubgRf.ModulationParams.Params.LoRa.Bandwidth = ( RadioLoRaBandwidths_t ) config->lora.Bandwidth;
        SubgRf.ModulationParams.Params.LoRa.CodingRate = ( RadioLoRaCodingRates_t ) config->lora.Coderate;
        switch( config->lora.LowDatarateOptimize )
        {
          case RADIO_LORA_LOWDR_OPT_OFF:
            SubgRf.ModulationParams.Params.LoRa.LowDatarateOptimize = 0;
            break;
          case RADIO_LORA_LOWDR_OPT_ON:
            SubgRf.ModulationParams.Params.LoRa.LowDatarateOptimize = 1;
            break;
          case RADIO_LORA_LOWDR_OPT_AUTO:
            if( ( config->lora.SpreadingFactor == RADIO_LORA_SF11 ) || ( config->lora.SpreadingFactor == RADIO_LORA_SF12 ) )
            {
              SubgRf.ModulationParams.Params.LoRa.LowDatarateOptimize = 1;
            }
            else
            {
              SubgRf.ModulationParams.Params.LoRa.LowDatarateOptimize = 0;
            }
            break;
          default:
            break;
        }
//--> Missing line on one side that generated the issue: 
        SubgRf.ModulationParams.Params.LoRa.LowDatarateOptimize = (config->lora.LowDatarateOptimize==0)?0:1;


  ...

 

Best Regards.