简述:使用TIM2捕获pwm
IDE: KEILv5.27
Firmware Package:STM32Cube FW_H7 V1.8.0
芯片:STM32H750VBT6
串口配置如下:
DMA配置如下:
在主函数里隔一定时间调用HAL_UART_Transmit_DMA(&huart1,(uint8_t *)SendBuff,SendBuffSize),但串口只能接收到一次。
用单步调试看了一下,只进入一次if (huart->gState == HAL_UART_STATE_READY) 查看huart->gState已经是busy状态。
HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
{
/* Check that a Tx process is not already ongoing */
if (huart->gState == HAL_UART_STATE_READY)
{
if ((pData == NULL) || (Size == 0U