GitHub

Notes /Wireless Transcriber /Transmission speed

Transmission speed

Zynq-7000 tops out at 125Mhz, this is insane. That means system clock goes up 125,000,000 every second.

My SPI needs to set register on falling clock and set CS on rising clock, so that means I can transmit at 62.5Mhz.

CC1101 needs 12bytes per packet where each packet represents one byte of actual usable information. That is 12 * 8 = 96 bits. However, SPI doesn't need to send all 96bits because most of it is generated by CC1101 by itself.

In fact, the information that needs to be sent via SPI to CC1101 is variant. When sending a burst FIFO packet, you need send a header 0x7F, then the length of the burst in bytes (0x00 - 0xFF), then the actual data that up to the length of bytes. Just the beginning sequence alone is 16bits. Then, there's SIDLE strobe, SFTX strobe, read from reg, STX strobe, read from reg again, then SIDLE strobe. All these steps are necessary to ensure that data was sent properly to the chip.

driver command SPI bytes reason
CMD_STROBE SIDLE 1 set to known state
CMD_STROBE SFTX 1 flush TX FIFO to remove dirty data
CMD_WRITE_FIFO 5 - 0x7F header + length + 3 payload send data
CMD_READ_REG TXBYTES 2 did the bytes actually reach FIFO?
CMD_STROBE STX 1 transmit the data
CMD_READ_REG MARCSTATE 2 did the bytes actually leave FIFO?
CMD_STROBE SIDLE 1 fall back to idle state
NOTE: I am sending 3 payload at a time because that's how I set it up. There's no other reason.

Counting it all up, its 13bytes = 13 * 8 = 104 bits in a packet

at 125000000 / 2 = 62500000 bits/second = 62500000 Mhz SPI speed

That would mean we can transmit up to 62500000/104 = 600,961packets/second. This is the FPGA fabric ceiling on how fast we can transmit information. This is how many points we can plot on the display a second


In my demo, I used 1Mhz clock for SPI. This means that I was transmitting at a rate of 1000000bits/sec / 104bits/packet = 9615.38461538 packets/s

I also put a slow down between transmission of 200ms.

1/0.2 = 5 packets a second.

Here's the problem, I can increase the transmission speed but CC1101 can only accept data at a speed of 6.5MHz, so my realistic cap would be 60,096 packets a second.

But there's also air interference to worry about. At 38.4 kbps (12-byte packet), its 400packets/s

Nearby in the graph