This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to https://www.bitcraze.io/documentation/system/
Syslink is the protocol used between the STM32 and NRF51 in Crazyflie 2.0. It handles low level communication on the serial port.
In Crazyflie 2.0 syslink is transmitted on serial port at 1MBaud. It is a packet-based protocol.
+-----------+------+-----+=============+-----+-----+ | START | TYPE | LEN | DATA | CKSUM | +-----------+------+-----+=============+-----+-----+
Note: Unless otherwise specified, all numbers are encoded in low-endian form.
Packet types is defined in the syslink.h file (in the stm32 and nrf51 firmware).
Packets are organized in groups to ease routing in firmwares:
Group | Name | Description |
---|---|---|
0x00 | RADIO | Radio related packets. For data and configuration |
0x10 | PM | Power management |
0x20 | OW | One wire memory access |
A packet type has its group in the high nibble and the type in the low nibble. In the rest of the page packet type are written with group.
This packet carries the raw radio packet. The NRF51 acts as a radio bridge. Because the NRF51 does not have much memory and the STM32 is capable of bursting a lot of data a flow control rules has been made: The STM32 is allowed to send a RADIO_RAW packet only when one RADIO_RAW packet has been received.
The NRF51 is regularly sending CRTP NULL packet or empty packets to the STM32 to get the communication working both ways.
Note So far RADIO_RAW is the only syslink packet that has flow control constrain, all other packets can be sent full duplex at any moment.
This packet is used only in ESB mode.
Packet sent to the NRF51 to set the radio channel to use. The NRF51 then send back the same packet to confirm that the setting has been done.
NRF51 radio channel are spaced by 1MHz from 2400MHz to 2525MHz.
This packet is used only in ESB mode.
Packet sent to the NRF51 to set the radio datarate to use. The NRF51 then send back the same packet to confirm that the setting has been done.
Possible datarate:
Value | Datarate |
---|---|
0 | 250Kbps |
1 | 1Mbps |
2 | 2Mbps |
Allows to put the nRF51 in continuous wave mode. If enabled the nRF51 will disable Bluetooth advertising and set its radio to emit a continuous sinus wave at the currently set channel frequency.
Warning Continuous wave is a test mode used, among other thing, during manufacturing test. It will affect other wireless communication like Wifi and should be used with care in a test environment
This packet is meaningful only in ESB mode.
Packet sent 100 times per seconds to the STM32. Contains the power value of the latest received packet. The value is the same as reported by the NRF51: between 40 and 100 which means measurement of -40dBm to -100dBm.
When sent by the STM32 to the NRF51, the NRF51 switch OFF the system and goes in deep sleep.
The SYSLINK_PM_BATTERY_STATE packet is sent 100 times per seconds to the STM32.