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.

Varible Packet Length problem in CC1125

Other Parts Discussed in Thread: CC1125

Hi

    The CC1125 transmits well . But i got another issue now

I configured the PKT_CFG0.LENGTH_CONFIG = 01, for variable packet length mode

i set the PKT_LEN to 0xFF.

packet framing is arrayx[256]={0xFE,0x01,0x02,0x03,0x04} ; Like this upto 25 datas , remaining i left as junk

Now i am trying to send 255 bytes , the MARCSTATE replies TX_FIFO ERROR . 

sendradio_data(&arrayx[0], 0xFF,&extIntFlag);

i tried with various number of bytes and got to know more than 64 bytes , this error raises.

What could be the problem here.?  

  • The FIFO is 128 bytes so 255 won't work. Have you ensured that the FIFO is empty before writing more than 64 bytes to the FIFO? Take a look at http://www.ti.com/lit/zip/swrc253.

  • Yes i accept your word, FIFO 128 bytes. If we need to ensure the FIFO every time i will loose my speed of transmission right?

    I configured the GPIO0 as TX_END status signal to ensure every time FIFO is cleared. i got MARCSTATE as 

    status - 0x33 for TX mode and then it changes to 0x41 - IDLE MODE . 

    Then another call to Sendradio_data in a while loop.

    When sending more than 64 , even at 65 the MARCSTATE is 0x16. TX FIFO ERROR

  • I would advice to use the functions from the example software I linked to.

    If you want to use your own I would start with looking at NUM_TXBYTES and the FIFO_THR to check that the content of the FIFO is what you think it is.

  • It is not a problem to send packet larger than the FIFO, but you cannot do this by strobing STX several times.

    What you need to do is to refill the FIFO before it runs empty. If you do not do this, and you have a length byte of 255, your TXFIFO will underflow.

    You can use the TXFIFO_THR signal on a GPIO line and then have an interrupt when the TXFIFO is drained below a certain threshold (127 −FIFO_CFG.FIFO_THR).

    Start by writing 128 bytes to an empty FIFO. If FIFO_CFG.FIFO_THR = 117 you will get an interrupt when there is less than 10 bytes left in the FIFO, meaning that you can write 118 more bytes to the TXFIFO. Now you have written in total 128 + 118 bytes = 246 bytes, meaning that the next time you get a FIFO threshold interrupt you write your reaminging 10 bytes to the FIFO.

    Siri