2025-08-07 10:53 AM
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.
2025-08-07 11:02 AM
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.
2025-08-07 11:13 AM - edited 2025-08-07 11:14 AM
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.
2025-08-07 11:32 AM
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.