2015-12-22 03:00 PM
Hi,
not sure it's a bug because it's my first time with CDC ACM. But After a fresh CubeMX generation with USB_OTG_FS in device mode. I just add this :uint8_t buf[] =
''Hello\r\n''
;
// delay to allow time to pc to load driver (I think so)
HAL_Delay(1000);
while
(1)
{
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);
HAL_Delay(50);
CDC_Transmit_FS(buf, 8);
}
}
If usb is connected to host during startup it's works.
Even if i disconnect usb cable. My led blinking.
But if usb cable is disconected the program freeze at line :
CDC_Transmit_FS(buf, 8);
have you any idea of what is the cause and how to fix it ?
Thanks
Attached is a zip of project with a Makefile for gcc.
#stm32f4-cdc-acm-usb-cubemx
2015-01-01 04:32 PM
Hi,
finallyI use
libopencm3,it works
perfectly
out of the box with gcc.