static int8_t CDC_Itf_Receive(uint8_t * Buf, uint32_t * Len)
{
SCB_CleanDCache_by_Addr((uint32_t *)Buf, *Len);
packet_receive = 1;
// USBD_CDC_TransmitPacket(&USBD_Device);
if (USBD_CDC_TransmitPacket(&USBD_Device) == USBD_OK)
{
USB_send_count++;
}
// HAL_UART_Transmit_DMA(&UartHandle, Buf, *Len);
return (USBD_OK);
}
程序是官方的 STM32H743 VCP 范例,用 BUS HOUND 模拟上位机,芯片运行后只能收发一次 |