USB_Serial_Bridge icon indicating copy to clipboard operation
USB_Serial_Bridge copied to clipboard

dont work in Keil 5

Open shredder2003 opened this issue 7 years ago • 2 comments

  1. download project
  2. open in Cube MX
  3. generate code for Keil
  4. flash to Blue Pill in Keil 4.5 connect Rx to Tx in Blue Pill (A9 to A10)
  5. start Blue Pill
  6. COM device appear without errors
  7. But nothing received after send data to COM port.

shredder2003 avatar Jun 01 '18 02:06 shredder2003

Do you observe the LED GPIO 13 blink when you try to send or receive the data?

ayushgaud avatar Jun 01 '18 08:06 ayushgaud

I see procedure "Toggle_Leds" in your main.c file. I suggest its your user code (not autogenerated by Cube MX code). All user code must be between special comments, in your case between

/* USER CODE BEGIN 4 */

/* USER CODE END 4 */

So, therefore all user code written not inside special comments, Cube MX discard this code, so now regenerated project does not contain user code. See comparison of your src and autogenerated main.c: https://www.diffnow.com/?report=ov23s

shredder2003 avatar Jun 01 '18 09:06 shredder2003