Skip to main content
Associate
August 7, 2025
Solved

Using an STM32C071 for a USB application. Crystal resonator not working?

  • August 7, 2025
  • 1 reply
  • 475 views

I have a custom board with an STM32C071K8T6, and I am trying to use it for its USB CDC capabilities.

I have designed my circuit to use an ABM3B-8.000MHZ-B2-T ceramic crystal resonator. In its specs, this crystal has a load capacitance of 18 pF, so I used the formula C_L = 2(18pF - 5pF) = 26 pF to select the load capacitor values (C6 and C7 in my schematic). However, I do not see any signal on the oscilloscope when probing OSCX_IN and OSC_OUT. At first I thought I had overheated the crystal during soldering, but I made sure to use hot air at 260 C as recommended in the specs.

I have an LED connected to PB0 that I can blink with a simple program when the crystal is connected but it will not work if disconnected. This leads me to believe that the crystal is working in some sense? But when I set up USB and CDC, I see nothing happen at all within the device manager. Will the MCU default to the internal clock if current can be passed through the crystal but there is no oscillation? I have checked all traces and none of them are shorted. Am I missing anything? Any help would be greatly appreciated, thanks.

 

Screenshot 2025-08-07 115341.pngScreenshot 2025-08-07 115424.pngScreenshot 2025-08-07 115233.pngScreenshot 2025-08-07 115257.png

Best answer by TDK

You do not need a crystal for USB on this chip. HSIUSB48 comes from an internal RC oscillator. You'll need to enable CRS SYNC in the RCC tab if you want to use that as the USB clock.

Perhaps try to get a working example up and running if still having difficulty.

STM32CubeC0/Projects/NUCLEO-C071RB/Applications/USBX/Ux_Device_CDC_ACM at main · STMicroelectronics/STM32CubeC0

1 reply

TDK
Super User
August 7, 2025

Doesn't look like you're using HSE anywhere in your system. Not for the main clock and not for the USB, at least. You use HSIUSB48 for both, which is fine.

"If you feel a post has answered your question, please click ""Accept as Solution""."
aj-adkinsAuthor
Associate
August 7, 2025

Regardless, I need an external crystal right? Where does HIUSB48 come from if not from HSE? In any case I do not see a USB device show up, unless there is some more configuration I need to do. Apologies for the simple questions, this is my first custom STM32 board, thanks.

TDK
TDKBest answer
Super User
August 7, 2025

You do not need a crystal for USB on this chip. HSIUSB48 comes from an internal RC oscillator. You'll need to enable CRS SYNC in the RCC tab if you want to use that as the USB clock.

Perhaps try to get a working example up and running if still having difficulty.

STM32CubeC0/Projects/NUCLEO-C071RB/Applications/USBX/Ux_Device_CDC_ACM at main · STMicroelectronics/STM32CubeC0

"If you feel a post has answered your question, please click ""Accept as Solution""."