Earlier quoted context omitted.
Thank you for the compliment ^_^ I'm glad you found the post helpful. This isn't a typo, actually. If you look at the documentation of the BSRR register (which is screenshotted in the blog post), it says of BRy: > These bits are write-only [...] [Setting to 1] Resets the corresponding ODRx bit So setting BR8 in the BSRR clears the ORD8 bit in the output data register. Because our LED is active low, this turns the LED…
Ahh I see now, thank you for teaching me. My mistake! Do you happen to know of any great learning resources, basically more posts like you've written that go into lots of details and explain why things are done? Thanks again!
How to flash an LED: writing ARM assembly for an STM32 microcontroller
61–68 of 68 posts
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#62Earlier quoted context omitted.
no, i spent months on this, and the answer is no They use IP from synopsis, but synopsis refuses to allow their docs to be published so every manufacturer has to read them and regurgitate them into their own docs in their own words . In any case official STM docs are incomplete. See their driver source - it accesses undocumented registers and sets undocumented bits in documented regs. Without them the usb core will n…
I don't know what issues you are having with STM32 I2C, but I have done dozens of STM32 designs and have never had an issue and needed to bitbang it.
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#63I have years of experience in asm programming with PIC processors, and my job is embedded software development. I got an STM32 development board a couple years ago to get my feet wet in ARM embedded development. I got completely bogged-down in setting up the development environment. It took me forever to get a blinking LED, and I spent an ungodly amount of time unsuccessfully trying to figure out how to change the ra…
Do you mean in assembly? If you just mean C, then if you’re already in embedded then I’d say a few years ago it was easy. These days it’s super easy - tools like STM32CubeMX will allow you to get even custom hardware up and running in no time. It will even spit out multiple project types - everything from ARM Keil/MDK/uVision to just a simple makefile.
I think there’s some actually interesting work being done with standardization like SVD files, but too many vendors treat them like second class citizens compared to their bulky code gen solutions.
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#64Earlier quoted context omitted.
Do you mean in assembly? If you just mean C, then if you’re already in embedded then I’d say a few years ago it was easy. These days it’s super easy - tools like STM32CubeMX will allow you to get even custom hardware up and running in no time. It will even spit out multiple project types - everything from ARM Keil/MDK/uVision to just a simple makefile.
I disagree that GUI tools like STM32CubeMX are useful. They end up being a crutch that end up adding increasingly complex wizard driven autogeneration, rather than just exposing the configuration in easy to consume ways. Sure, you can get something running fast, but it’s incredibly difficult to move from “blink a led via this template project” to “build a useful project integrating multiple peripherals”. I think ther…
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#65Earlier quoted context omitted.
I don't know what issues you are having with STM32 I2C, but I have done dozens of STM32 designs and have never had an issue and needed to bitbang it.
Send an address only packet (smbus uses these) Just try. Now do it to an address that doesn't ack. Enjoy your wedged i2c state machine.
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#66Earlier quoted context omitted.
I don't know what issues you are having with STM32 I2C, but I have done dozens of STM32 designs and have never had an issue and needed to bitbang it.
Send an address only packet (smbus uses these) Just try. Now do it to an address that doesn't ack. Enjoy your wedged i2c state machine.
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#67Earlier quoted context omitted.
Avoid ST at all costs in my experience. Their documentation is terrible. They never acknowledge hardware errata even after clear evidence of it. They’re not a company with a solid engineering culture imo
I'm really surprised to hear that. ST has always been one of my favorite manufacturers. I find their datasheets to be clear and well laid out, though I will note that I'm usually more interested in the hardware side than the software side. Their chips and boards are also high quality and convenient, e.g. GPIOs are often five-volt tolerant, Nucleo boards come with well-made breakout headers and several peripherals (at…
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#68Earlier quoted context omitted.
Atmel (now under Microchip). They have great documentation and software libraries. And they actually acknowledge hardware errata in the documentation.
And they actually acknowledge hardware errata in the documentation. More so for Microchip than Atmel --- it's pretty common to find on some of their newer and more complex parts a ton of errata, among which there are some extremely "WTF!?" ones like "feature X does not work at all".