mirror of
https://github.com/EFeru/hoverboard-firmware-hack-FOC.git
synced 2025-08-04 18:14:28 +02:00
Updated Variant USART (markdown)
@@ -20,7 +20,15 @@ Commands are send as binary frames with following structure:<br />
|
||||
- Checksum(unsigned int16) : XOR checksum
|
||||
|
||||
The least significant byte comes first (little endian).<br>
|
||||
The FOC firmware will discard frames that are not starting with proper start frame and not ending with correct checksum.<br />
|
||||
|
||||
## Error rejection
|
||||
|
||||
The FOC firmware will discard frames if:
|
||||
- Command length is not correct
|
||||
- Start frame is not correct
|
||||
- Checksum is not correct
|
||||
- 1 character inactivity on RX line while receiving the frame ([Idle Line Interrupt](https://github.com/1847123212/STM32_USART_DMA_RX#about-usart))
|
||||
|
||||
A timeout will be triggered if no correct frame is received during the time specified with parameter SERIAL_TIMEOUT in config.h (160ms by default).<br />
|
||||
|
||||
## Calibration:
|
||||
|
Reference in New Issue
Block a user