ADC making code not upload correctly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-21 4:01 AM
Hi,
I'm programming an STM32F030C8T6 MCU. When I attempt to upload my code, it gives me an error: "Could not halt device (19)". I noticed that this only happens when ADC is enabled from CubeMX. When I disable it, everything works fine. The code doesn't even use it. It is only when I have enabled ADC in the .ioc file in my project directory in STM32CubeIDE. I need ADC for my project. What could be causing this and how can I fix it?
Thanks.
Solved! Go to Solution.
- Labels:
-
ADC
-
STM32F0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-21 5:44 AM
The error still persists.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-21 5:51 AM
Hi,
I made the changes as suggested by your image, however the same error ("Could not halt device (19)") still pops up into the prompt when ADC is enabled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-21 5:51 AM
Could you please tell which board you are using?
I will try to reproduce the behavior when I have one of STM32F030xx boards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-21 5:52 AM
I am using STM32F030C8T6 microcontroller.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-21 6:34 AM
Is this a custom board? Perhaps an error in the design/schematic. How is VDDA connected? Can you provide the schematic?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-21 7:36 AM
Hi,
I noticed now that VDDA is connected to VDD in my schematic, but I had not connected it in the PCB design. This is definitely the cause of the problem. How could I resolve it without ordering another one? Also the pins are so small that I doubt I will have any luck soldering them together.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-21 8:02 AM - edited ‎2023-12-21 10:31 AM
Depending on the layout, you can solder multiple pins together to make the connection. For example, solder all of VDDA, PA0, PA1 in a solder bridge to make the VDDA pin effectively bigger, then bridge it with a wire to VDD. Going to be challenging with hobby soldering tools, but possibly doable.
But yeah, that's your problem VDDA being left unconnected is the issue causing the error you're seeing.
> I noticed now that VDDA is connected to VDD in my schematic, but I had not connected it in the PCB design.
Design software should have checks to ensure this doesn't happen, but you do need to remember to run them. We all make mistakes, good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-21 10:14 AM
Hi,
Thanks for your help. Unfortunately the pins next to VDDA are also in use in my project. I tried this before with no luck.
Best regards,
Juhani

- « Previous
-
- 1
- 2
- Next »