ayushgaud / USB_Serial_Bridge

USB Serial Bridge for STM32F103C8Tx based ARM modules
Other
43 stars 14 forks source link

dont work in Keil 5 #1

Open shredder2003 opened 6 years ago

shredder2003 commented 6 years ago
  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.
ayushgaud commented 6 years ago

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

shredder2003 commented 6 years ago

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