This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Rx Buffer Length Radio

Other Parts Discussed in Thread: CC430F6137, CC1101

Hi,

I'm using cc430f6137 microcontroller und I have modified the example program "Variable LT FIFO". My question is:

    - if I want to chnage the length (for example: #define  PACKET_LEN    (0x13), default value is PACKET_LEN    (0x05)  ) then the code does not work. On the side of the receiver the function:     "RxBufferLength = ReadSingleReg( RXBYTES );" always read 0x07! That means RxBufferLength is always 0x07. Does anyone know why?

Regards,

Admir

  • Admir,
    It sounds like you're USCI is in 7-Bit mode. Try setting UCAxCTL0 &= !UC7BIT, and let me know if that works.


    Best regards,
    Cameron
  • Hi Cameron,

    Sorry, it is a matter of Radio Register (CC1101 - Based Radio Module). This function (readSingleReg):  RxBufferLength = ReadSingleReg( RXBYTES ); alway read 7.

    __interrupt void CC1101_ISR(void)
    {
      switch(__even_in_range(RF1AIV,32))        // Prioritizing Radio Core Interrupt
      {
        case  0: break;                                                                  
        case  2: break;                       
        case  4: break;                       
        case  6: break;                       
        case  8: break;                       
        case 10: break;                       
        case 12: break;                        
        case 14: break;                                 
        case 16: break;                        
        case 18: break;                      

        case 20:
            if(Empfeanger)
            {
       
                 RxBufferLength = ReadSingleReg( RXBYTES );
                 ReadBurstReg(RF_RXFIFORD, RxBuffer, RxBufferLength);

           
                 if(RxBuffer[CRC_LQI_IDX] & CRC_OK)
                 {
               
                     WDTCTL = WDTPW + WDTCNTCL;
                     WDTCTL = WDTPW + WDTIS_5 + WDTSSEL__ACLK;

                
                  if(RxBuffer[2] & BIT0)
                      Sender = 0x01;
                  else
                      Sender = 0x00;

              
                  if(RxBuffer[2] & BIT1)
                      P3OUT |=  BIT0;
                  else
                      P3OUT &= ~BIT0;

                  TA0CCR2 = RxBuffer[4];


                  TA0CCR1 = RxBuffer[3];

         
                  P3OUT ^= BIT6;


                  if(Sender > 0)
                  {
                  
                      Empfeanger = 0x00;
                  }
                 }
            }
            else if(Sender)
            {
             
                RF1AIE &= ~BIT9;

                Empfeanger = 0x01;
                Sender     = 0x00;

              
                P1OUT ^= BIT0;
            }
            else
            {
            
                while(1);
            }

          break;

        case 22: break;                      
        case 24: break;                        
        case 26: break;                      
        case 28: break;                        
        case 30: break;                       
        case 32: break;                       
      }  
      __bic_SR_register_on_exit(LPM3_bits);     
    }

    Regards,

    Admir

  • Admir,
    Sorry for the delayed response. Have you tried changing the settings in RFRegSettings.c inside the HAL folder?

    Best regards,
    Cameron
  • Cameron,

    correct in this function " WriteRfSettings(&rfSettings);" and variable in "rfSettings" is constant, so " 0x05 // PKTLEN Packet length."

    Best regards,
    Admir
  • Great. Just to confirm, that fixed your issue?

**Attention** This is a public forum