2019-12-15 02:30 PM
I made my first STM32 board (with STM32H743ZI). The core software is not pure STM, but it's based on an official Arduino core for STM32 (stm32duino), which in general makes things easier, initializing GPIOs etc. I am able to program the MCU (via stlink v3 mini), so SWD and flash work. I am able to correctly set up the clock (with 25 MHz crystal), and PLL'ed clock output -- so these parts work as well. BUT I'm unable to do even the simplest pin toggling.
Do you have any idea how I can approach the problem? Find where lies the source? I had a bit of trouble soldering it correctly, and I think I hot aired it 4 times -- maybe I destroyed the chip this way? Probably the easiest way to troubleshoot the problem would be to use a debugger, but I never used it and I don't even have any idea how to start -- what tools I can use (preferably macOS) or how to set it up. Maybe the program gets stuck in an infinite loop because of some hard fault -- but is there any way to check it without a debugger?
2019-12-15 09:58 PM
Test your firmware on a Nucleo-H743ZI board. Check the schematics in the board user manual, a few pins are connected to onboard peripherals. A 25 MHz crystal is not included, but it can be added.
If it works, then check if all Vdd/Vss pins are properly connected and getting powered on your board.
STM32CubeIDE should work on macOS "out of the box", you can set breakpoints or halt the firmware anytime to check what it's doing, examine the hardware registers and check them against the reference manual.
2019-12-15 10:17 PM
Those ICs are fairly robust, unless you try to "spot weld" them, i.e. apply high heat on a concentrated spot.
> I am able to correctly set up the clock (with 25 MHz crystal),...
In my experience, a quartz doesn't take repeated heating too well.
> I am able to program the MCU (via stlink v3 mini), so SWD and flash work.
Several things that can go wrong. So why not trying to debug into the code ?
Flash timing (wait states) could be incorrect, causing your application to die quickly.
2019-12-16 11:18 AM
Thank you guys VERY MUCH for the encouragement. I planned on learning and using CubeIde before, but it was getting stuck on "downloading software" dialog (I was not alone to experience this bug as far as I checked the internets) and I gave up. But given your "promise" that CubeIde is a good thing I finally was able to make it run. And I love it. Everything in one place and everything JUST WORKS. That's what I was looking for. And yeah, I can blink LEDs now. So the problem was somehow related to the arduino core. Now I'll have to learn to do everything in pure STM environment, but I was planning to graduate to this level anyway. Thanks again!