2014-09-03 08:26 AM
I've been trying to run the system bootloader from my application on an STM32F205. I think that should b feasible, but at present the system firmware behaves badly. Probably I'm doing something wrong, but I can't presently see what.
I can read the bootloader version OK (0x33 == V3.3) and I can see what appear to be vectors at 0x1FFF,0000 (AN2606 says 0x1FF0,0000 but I believe it's wrong).
I can pick up the second vector (reset point from 0x1FFF0004 0x1FFF3DE5) and call it as a function.
The code at that address [0x1FFF3DE5] begins executing, but after a few instructions breaks with a UsageFault_StateError.
Can anyone give an insight into what I'm missing?
Also, if anyone is familiar with this, I'm presuming I need to set up the GPIO pins as per AN2606 so the bootloader chooses the appropriate port, e.g., by setting ''don't use this'' ports to outputs and the port to use to an input(s).
Thanks.
2014-09-03 12:05 PM
The ROM expects you to enter at near reset conditions, so interrupts running, and PLL's clocking is to be avoided.
The address of the Boot ROM depends on the architecture.2014-09-04 01:22 AM
Oh, right! I definitely have both of those enabled.
So my best bet is to reset the hardware as best I can, then set up the specific IO, then call the bootloader. The assembler clip appears very helpful. I think that's doing the vital bits of the hardware reset, I'll need to add by port configs somewhere within that. Thanks Clive.2014-09-04 01:41 AM
I've just followed and read the second link, which I hadn't originally as I was already aware of the address differences. That's another very useful code clip. My tool-set's built-in start-up code zeros RAM, and I've rather become used to that, so overlooked the option of magic numbers in RAM.