Earlier quoted context omitted.
This is true! If I was writing something to be optimal speed- and size-wise, I'd do that. I think I just liked the consistency with the other parts of the code where using both was necessary :)
Oh actually I was being sleepy and hadn't understood what you'd said! I hadn't realised you could do that actually, neat, thanks! So you could do `mov r1, #0x01000000` right? nice.
How to flash an LED: writing ARM assembly for an STM32 microcontroller
11–20 of 68 posts
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#12Earlier 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…
Can you point to where the undocumented registers are used in the source? I don't see anything obvious that fits that definition in: https://github.com/STMicroelectronics/STM32CubeF4/tree/maste... (I've chosen the version for STM32F4 arbitrarily; if there's something similar in one of their other USB support libraries, feel free to point to that instead.)
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#13Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#14Earlier quoted context omitted.
Oh actually I was being sleepy and hadn't understood what you'd said! I hadn't realised you could do that actually, neat, thanks! So you could do `mov r1, #0x01000000` right? nice.
yup, some other constants are also loadable in one instr, of the form 0xXX00XX00, 0x00XX00XX, 0xXXXXXXXX where XX is any byte
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#15Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#16Earlier quoted context omitted.
Can you point to where the undocumented registers are used in the source? I don't see anything obvious that fits that definition in: https://github.com/STMicroelectronics/STM32CubeF4/tree/maste... (I've chosen the version for STM32F4 arbitrarily; if there's something similar in one of their other USB support libraries, feel free to point to that instead.)
a few bits used here are not in the docs: https://github.com/STMicroelectronics/STM32CubeF4/blob/maste...
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#17Is there a better way to sleep/delay other than what basically seems like 100% CPU usage in a subtraction loop?
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#18Is there a better way to sleep/delay other than what basically seems like 100% CPU usage in a subtraction loop?
if you have an OS, yes
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#19Is there a better way to sleep/delay other than what basically seems like 100% CPU usage in a subtraction loop?
Re: How to flash an LED: writing ARM assembly for an STM32 microcontroller
#20Is there a better way to sleep/delay other than what basically seems like 100% CPU usage in a subtraction loop?
This would take a fair bit more code to configure the timer, and setup an interrupt to handle the timer.