har-in-air / STM32F411_USB_AUDIO_DAC

USB Hi-Res Stereo Audio DAC using STM32F411 / 401 "Black Pill" development board and Texas Instruments PCM5102A / Philips UDA1334ATS DAC modules
GNU General Public License v3.0
163 stars 31 forks source link

Do you think this project could be made to use the internal clocks on the microcontroller? #22

Closed DeflateAwning closed 9 months ago

DeflateAwning commented 9 months ago

I'm working on a PCB for this project, and I'm trying to make it as small as possible. Any thoughts on the ability to use the internal clock on the STM32F411 instead of the external crystal clocks on the Black Pill dev kit?

har-in-air commented 9 months ago

I don't have Stm32CubeIDE installed on my laptop right now, you can open the graphical dialog showing clock configuration and see if the usb peripheral clock can be generated from the internal RC clock. The internal RC clock in microcontrollers is usually not accurate or stable enough for reliable USB operation. I don't remember seeing any datasheet or app note suggesting that it would be OK. If it was possible, they would definitely have made a big deal of it.

DeflateAwning commented 9 months ago

I don't see an IOC file in the repo, which is normally what allows you to use the GUI to look at clock/pin/peripheral configurations. Is there another way you know of?

I'm sure you're right though

har-in-air commented 9 months ago

It's a makefile project that supports two different cpus. With STM32CubeIDE you can create a new dummy project for the specific 401 or 411 device and then check out the clock configuration tab.