2025-11-16 10:43 AM
Hi, I've been trying to get a ground-up bare metal implementation of SPI working on one of the STM32 boards I own, but I can't seem to make progress on any of them. I lack an ST Link for the 405, so I can't step through my program and see how the registers are configured sadly, so I figured I'd ask here to see if anyone has experience doing something similar. I've attached the relevant GPIO and SPI c code to this post, as well as the main function for my project. Any help would be much appreciated, thanks.
2025-11-16 12:02 PM
You’re on the right track, but SPI on the F4 can be sensitive to small setup details. Most problems come from the wrong AF pin mapping or missing SSM/SSI settings when using software NSS. Try a simple loopback test by connecting MOSI to MISO to confirm your setup. If you share which pins you’re using, it’ll be easier to spot any config issues.