AnsweredAssumed Answered

Help getting ISR callback for timer?

Question asked by mitchell.jeff on Jan 14, 2014
Latest reply on Jan 15, 2014 by mitchell.jeff
I'm quite likely missing something obvious to someone, but so far this is eluding me :)

I've got an STM32F205RE by itself on a breadboard (no eval or discovery board here.) I'm using libopencm3 for linker-script and some sample code, and using the toolchain, along with openocd for flashing. Linux based environment. I've added external 8mhz crystal and associated caps to ground, and using the libopencm3 go-to-120MHz function, but nothing else on the board.

Code in question is quite short, here:

Essentially a blinking light hello world app, but goal being to toggle the LED in an ISR callback from the timer. I have a variation of that code that polls the timer and works fine .. so I know I can build code and deploy it okay in general, but this particular version isn't working.

I suspect something out of the code (so the vector table is goofy, and my ISR function is not being seen at all?), or perhaps I'm just missing a register assignment somewhere. I'm new to STM32 world so trying to get my head around the documentation and so on .. if you spot anything, let me know :)

I'm using linkerscript as from libopencm3-examples, though modified to have the right ROM and RAM size for my chip (since there is onyl 1 sample for the F2 chip).

In case its a deployment issue, I'm deploying like this:
openocd -f interface/stlink-v2.cfg \
                    -f target/stm32f2x_stlink.cfg \                                                                                                                                         -c "init" -c "reset init" \
                    -c "stm32f2x mass_erase 0" \
                    -c "flash write_image miniblink.hex" \
                    -c "reset" \
                    -c "shutdown" $(NULL)

I flash the code, hit reset on the chip (pull it to ground for a moment), and then led just stays on. I've not hooked up any debugger yet (next thing to figure out), so I'm not sure if its crashed or hanging on blocked interupts or what.

Thank you for any help, and for your patience in reading,