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.

TX TIME

I have a question,

i saw some code using GD0 = 0x06 to depend on packet end,

however, i have a question.

Do It have preamble count and sync also send through the air,

so after a falling edge of  GDO0, i need to wait:

1)both the preable and sync time

or

2) just the sync time need to

wait another tx again?

Thanks

Jeff

  • From the User Guide:

    TX: Asserted when sync word has been sent, and de-asserted at the end of the packet.
    Hence you are done sending your packet when the GDO pin goes low and you may strobe Tx again to send a new packet.
  • Thanks TER,

    I find that maybe the problem is due to putting the packet to TXFIFO

    //====

    while(1)

    {

               if((ch_cnt<n_pkt))                               
                {
                    tx_buf[0] = 77;
                    tx_buf[1] = 49;//'1'
    //              tx_buf[2] = 31;//'1'
                    tx_buf[3] = 30;//'1'
                    tx_buf[4] = run_code;//'1'
                    ccxxx0_WriteBurst(CCxxx0_TXFIFO, tx_buf, 6);     // addr=M, payload=4 bytes, ukupno PKTLEN=5
                    delay_nms(15);    //<- !!!!!!!!!!

                 ccxxx0_Strobe(CCxxx0_STX); // activate tx!
                 delay_nms(1);    
                 while((PIND & (1 << PIND2)));// add <-------- This is GDO0 pin

                 delay_nms(n_delay);//<- !!!!!!!!!!

          }

    ch_cnt++;

    }

    //=====================

    I am running on 4.8kbps and fix packet length = 6

    My problem is that if i didnt add the delay delay_nms(15) & delay_nms(n_delay), my packet will SEND NOT THE NUMBER NOT MATCH , can anyone help ?

    thanks

    Jeff

  • Hi Jeff

    After writing n bytes to the FIFO, (PKTLEN  = n) you strobe STX. The radio will go from IDLE to TX and then start to send preamble and sync word. After sync is sent GDO0 will be asserted (rising edge on GDO0). After the complete packet is sent (n bytes + CRC if enabled) DGO0 will be de-asserted (falling edge).

    When polling GDO0 the way you do it you must first wait while it is 0 (as the preamble and sync is not yet sent when you start to poll). After that you wait while it is 1.

    while(!(PIND & (1 << PIND2)   ) ); // Wait for GDO0 to go high indicating sync sent

    while((PIND & (1 << PIND2)   ) ); // Wait for GDO0 to go low indicating packet sent

    Polling like this only works if there are no other interrupts that can change the timing with respect to when you do your polling. A better solution is to set up al falling edge interrupt on GDO0 and then wait for this interrupt to happen.

    BR

    Siri