波特率提升为921600,修复了和视觉通信的溢出错误以及DMA冲突.

This commit is contained in:
NeoZng
2023-03-18 14:50:50 +08:00
parent 11b401c2bc
commit 87d0a5161c
10 changed files with 34 additions and 32 deletions

View File

@@ -61,5 +61,8 @@ void VisionSend(Vision_Send_s *send)
// 将数据转化为seasky协议的数据包
get_protocol_send_data(0x02, flag_register, &send->yaw, 3, send_buff, &tx_len);
USARTSend(vision_usart_instance, send_buff, tx_len);
USARTSend(vision_usart_instance, send_buff, tx_len,USART_TRANSFER_IT); // 和视觉通信使用IT,防止和接收使用的DMA冲突
// 此处为HAL设计的缺陷,DMASTOP会停止发送和接收,导致再也无法进入接收中断.
// 也可在发送完成中断中重新启动DMA接收,但较为复杂.因此,此处使用IT发送.
}