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.

CC1101 problems filling TXFIFO

Other Parts Discussed in Thread: CC1101

Hi Folks,

I have recently begun working with the CC1101. Initially I am trying to transmit a byte of data.

When I write a byte of data to the TXFIFO I do not see a change in value of the FIFO_BYTES_AVAILABLE[3:0] in the chip status byte. Also, when I read the number of bytes in the TX_FIFO using the TXBYTES(0xFB) command I read back a value of 0x00. Is this correct, should I be seeing the TX_FIFO fill in before I issue an STX strobe?

Thanks in advance,

Tim

  • Best Tim,

    you see a couple things wrong. First of all, the status byte returned depends on the read/write bit in your header byte. When you for example read a register, the status byte [3:0] contains the number of bytes in the RX fifo. You should notice, that 4 bit can never represent 64 bytes. So the status byte contains only the first 0xF bytes in the RX fifo.

    To get the write status byte, you need to do a write operation, for exapmle the SNOP command, with the write bit. This will return the write status byte. Also this byte containse only 4 bits of TX fifo information. Those 4 bits represent the number of bytes left to fill. So you will only see changes above 49 bytes. This will probably explain why you can't see the byte in your TX fifo through the status byte.

     

    Next, you don't see the byte in the status register as well. If you are using register 0xFB to check the number of TX bytes, you will be returned the number of RX bytes, because the 0xFB address is for the RX fifo. Instead you need to use 0xFA. Notice that the address 0xFA is the address 0x3A, but with the burst and read bit. This means that the first byte you will receive is the status byte again, and than the 2nd byte is the byte from the status register.

     

    I hope this will help you, if not, please specifie your problem.

     

    Best regards,

    Rick

  • Some register values:

    MCSM2=0x07
    MCSM1=0x30
    MCSM0=0x18

    IOCFG2=0x0E

    IOCFG0=0x06

    PKTCTRL1=0x04
    PKTCTRL0=0x45

    FIFOTHR=0x07

    When I write a 16 and LESS bytes (15 bytes of data and 1 byte - length of the packet when I read the number of bytes in the TX_FIFO using the TXBYTES(0xFA) command I read back a value of 0. If I write STX(0x35) and after that read the number of bytes in the TX_FIFO using the TXBYTES(0xFA) ommand I read back a value of 32 (DEC). GDO0 does not change, ie packet dont send.

    When I write a 17 and MANY bytes (16 bytes of data and 1 byte - length of the packet when I read the number of bytes in the TX_FIFO using the TXBYTES(0xFA) command I read back a value of 32. If I write STX(0x35) and after that read the number of bytes in the TX_FIFO using the TXBYTES(0xFA) ommand I read back a value of 32 (DEC). GDO0 is change(0->1->0).

    Here's a piece of code relating to the transfer to Pascal:

      strob(SIDLE);  // set IDLE
      strob(SFTX);  // Flush the TX FIFO buffer - 0x3B
      strob(TXFIFO_B); // TXFIFO burst - 0x7F
      strob(17); // write length of the packet
      strob(0);  // write address
      for i:=1 to 16 do  strob(reg_var[i]); // write data
      strob(STX); // set TX - 0x35
      While gdO0<>1 do nop;
      While gdO0<>0 do nop;

    The most interesting thing that TXFIFO allocated 33 bytes, ie, 16 and 17 - the midpoint.

    Can you help me?