I made a custom board using STM32F103VCT6 MCU as shown in the attached schematic below. I soldered all the components as per the schematic and powered it on. The board worked for sometime and stopped working. We found that the 3.3V line was shorted to ground which was due to internal shorting of the MCU.(It was also heating up).
Note: The main MCU, CP2102 and USB headers were SMT assembled by the board manufacturer.
So for the 2nd board i started slowly and soldered only the programming header, HSE clock, boot select, reset switch, 3.3V regulators and probed for a test signal (PWM on PA15). It was working fine. We added the circuit for CP2102 and send a test msg via UART (to CP2102) which was successfully read from a COM port on the PC. The problem began when we tried to read data directly from STM32 (CDC configuration)through the other USB header port(PA11 and PA12).
The test msg was being sent out for 5 seconds and hanged up. An error popped saying usb device was not recognized. The CP2102 was also not recognized. I was not able to flash the board too after that (using st-link utility) which sent a message that the core was held under reset. Upon probing the reset pin the voltage was held at 0.7v. The reset pin was latched at the above voltage. After allowing the board "rest" for some time , the reset pin was unlatched and i was able to flash again. But the stm32 was still not recognized as an USB device. In the device manager it says that the device descriptor request failed.
Later i soldered an external CP2102(breakout board) and was able to communicate through it(USART1 - PA9 and PA10). But the CP2102 on the board was still unresponsive () and the USB_CDC is also not recognized
The board is supposed to read sensor inputs and send them via USB_CDC(PA11 PA12) Note - (the cp2102 on the board was only to flash programs directly via usb).
Current status of board :
- USB_CDC device descriptor failed (sometimes it shows up as COM6 but disconnects after 10seconds)
- On board cp2102 was recognized as COM5 and was communicating for more than a minute and suddenly disconnected. Later attempts at reconnecting recognizes the cp2102 but when trying to connect immediately disconnects.
- External CP2102 is working fine.
- PWM was working too.
- Probing D+ & D- of USB CDC has yielded the below waveforms. These waveforms were only detected when the USB was detected as a COM port.
My questions are as follows:
- Is the schematic right
- What caused erratic behaviour of the reset pin
- Does connecting through usb cause the erratic behaviour of the board
- How to check if the MCU's USB circuitry is fried
I am using CDC_transmit_FS command to send the message via USB.
HAL_Delay(200);
HAL_UART_Transmit(&huart1, msg, 3,HAL_MAX_DELAY);
HAL_Delay(200);
CDC_Transmit_FS(msg, 3);
HAL_Delay(200);
HAL_UART_Transmit(&huart2, msg, 3, HAL_MAX_DELAY);