cancel
Showing results for 
Search instead for 
Did you mean: 

S2LP in UART OTA mode via FIFO: how to add start and stop bits?

AKouz
Associate II

I am trying to use S2LP in UART OTA mode. It works well when I trasmit and receive via GPIO pins. But when I transmit via FIFO, S2LP does not add start and stop bits as it supposed to.

According to S2LP datasheet rev.7 clause 7.4: "When this format is selected, a start bit and a stop bit can be programmed to be added to each byte of the TX FIFO". There is no reference how it can be programmed, thus, I assume that start and stop bits are added automatically to each transmitted FIFO byte as soon as I enable UART OTA mode.

The relevant configuration I use:

2B:80   // PKTCTRL6 - SYNC_LEN=2, MSB PREAMBLE_LEN=0 - b'1000 0000'

2C:00   // PKTCTRL5 - LSB PREAMBLE_LEN=0

2D:00   // PKTCTRL4 - LEN_WID=0 (1 bytes)

2E:A4   // PKTCTRL3 - packet UART OTA, Rx - direct via GPIO, preamble=0101, byte swap - b'1010 0100'

2F:11   // PKTCTRL2 - stop_bit=1, start_bit=0, variable length - b'0001 0001'

30:04   // PKTCTRL1 - no CRC, no whitening, direct Tx through FIFO - b"0000 0100'

31:01   // PKTLEN1

32:00   // PKTLEN0

I set Tx mode and fill FIFO with repeated pattern 0x55,0x55,0x55,0x55,0xF0,0xF0.

Another S2LP is used as a sniffer, it works in UART OTA mode via GPIO pin. Using oscilloscope, I can see that receiver gets the pattern 0x55,0x55,0x55,0x55,0xF0,0xF0 "as is", without start and stop bits. Also it looks like the bit order is MSB first, despite of "byte swap" bit being set.

Maybe I am wrong in the assumption that start and stop bits are added automatically. Maybe I must enable it somehow. But I have no idea how to do that.

1 REPLY 1
AKouz
Associate II

Update: "byte swap" works, my mistake.