1
\$\begingroup\$

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). Top_layer Bottom_layer Schematic

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. USB_waveform

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);
\$\endgroup\$
8
  • \$\begingroup\$ Where is the schematic? Please edit the post so that schemarics are added. \$\endgroup\$ – Justme Mar 30 at 8:23
  • \$\begingroup\$ I am sorry i added the schematic but it isnt showing up in post . here is the link of the schemtaic: i.stack.imgur.com/GxREp.png . I will update the schematic in the post too. Thank you \$\endgroup\$ – Farvez Farook Mar 30 at 8:25
  • 3
    \$\begingroup\$ Serial debug header has +5v routed out. Doesn't this mean the debugger (a proper ST-Link) would use that voltage to drive STM32 SWDIO/SWDCLK pins with 5v and eventually kill it? \$\endgroup\$ – Vlad Mar 30 at 8:43
  • \$\begingroup\$ The 5 volts from St-Link goes through 3.3 LDO to power the stm32 and the SWDIO/CLK are 3.3 volt signals \$\endgroup\$ – Farvez Farook Mar 30 at 8:57
  • 1
    \$\begingroup\$ There are many suspicious things in the schematics. Listing everything here would be very open-ended. First of all there are two separate regulators so most likely VDD and VDDA have had more than the absolute maximum difference of 50mV between them so the chip can be damaged. \$\endgroup\$ – Justme Mar 30 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.