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: Is there a driver that readily works with CC1101 on the AM335x

Part Number: CC1101
Other Parts Discussed in Thread: AM3358

Hello team,

Hope you are well.

Is there a driver that readily works with the CC1101 on the AM335x?

The customer's research has shown that user space SPI use will be preempted by kernel processes and delay its use.

They have started looking at the PRU, but would like a way to speed things along.

Any recommendations?

Issue:

The CC1101 is responding over SPI, but with incorrect data. Have a CC1101 working with a competitor MCU for years.

The AM335 is new and so is the development environment. User space code on the board appears to not work with the implementation below:

   struct spi_ioc_transfer transfer[3];           //the transfer structure

   // send the SPI message (all of the above fields, inc. buffers)

   int status = ioctl(fd, SPI_IOC_MESSAGE(3), &transfer);

Posted the question on Sitara page and they recommended that I post the question here.

Regards,

Randhir

  • We have only examples for some MSP430s.

    We have seen some indications that if a fast MCU is used some extra error handling should be added in the code. We have had some indications that with a fast MCU the status read over the interface is for the previous SPI command since the MCU get the status before CC1101 has updated it.
  • Further developments:

    We have confirmed that the SPI communication from the AM3358 to the CC1101 is working correctly and the data returned from the CC1101 is correct.

    The current issue is the "receive buffer" holding incorrect data.

    The data returned may be a byte with data "0x2A", but the data recorded in the buffer if "0xCC". It looks as if the receive buffer if recording the returned data at doubletime after the first nibble of returned data. The issue is the same for every bite that comes in.

    Again, the Oscilloscope shows correct data and operation of the SPI with the CC1101 cooperating.
  • CC1101 cooperating clarification:

    Data can be written to the CC1101 and read using the ioctl commands. The registers of the CC1101 change and the device can be made to transmit correct data on 433MHz. The registers are read and confirmed on the Oscilloscope. The SCLK and MOSI and MISO all work correctly.

    The only thing that does not match up is the receive buffer on the AM3358 after the ioctl() function.

    ioctl(fd, SPI_IOC_MESSAGE(3), &transfer);

    The array assigned to transfer[0].rx_buf always results in the previous error of doubling (double speed) the least significant nibble.
  • Success! Source of issue still unknown.

    The CC1101 was never the issue. "spidev1.0" was working incorrectly. The communication was moved over to spidev2.0 and spidev2.1 and the code works as written.

    If anyone knows of the source of this issue for "spidev1.0", please reply. I would like to use the port if possible.
  • You should try to post your question in the following forum:

    e2e.ti.com/.../

    BR

    Siri