Have you managed to toggle the led in a simple while loop with a software
dealy in main? This would confirm that your toolchain, makefile and port is
set up correctly.
On 27 Feb 2015 00:37, "Jorik Jonker" <[email protected]> wrote:

> Hi all,
>
> After a few years of toying around with AVR I started experimenting with
> ARM using libopencm3. I got myself a cheap STM32 board and started coding.
> I was trying to get a very simple example working using a timer, ISR and a
> LED connected to a PWM port, and spent many hours not getting it to work.
>
> I've tried to adopt the example in
> 'libopencm3-examples/examples/stm32/f1/other/timer_interrupt' to my
> specific board using different GPIO and Maple's linker script, but no luck
> too.
>
> I've narrowed the code down to something that should toggle the onboard
> LED at 2Hz, yielding a 1Hz LED blinker. Unfortunately, the LED is shut off
> after the bootloader (Maple's DFU) finishes.
>
> I've created a Gist with my files:
> https://gist.github.com/jonkerj/e40e9b95f8e336c26a23
>
> I am not an expert on vector tables, but I find the generated vector table
> in my ELF binary rather suspicious for two reasons.
>
> First of all, I am trying to hook on TIM2's IRQ, which should be IRQ 28 on
> STM32 F1, according to ST's datasheet and libopencm3's json file. If we
> take a look into the objdump in the gist, we see that the vector table
> starts at 0x8005000. My ISR seems to be referenced at 0x80050b0 (that's IRQ
> 44, right?) and not at 0x8005070 (which is IRQ 28).
>
> Secondly, the vector table references the ISR routine "off by one": my ISR
> starts at 0x080051cc and the vector table jumps to 080051cd.
>
> I am a bit at loss if I am messing things up or if I'm running into a bug,
> so I was hoping a post to libopencm3's list could shed some light on this
> matter.
>
> Best regards,
>
> Jorik Jonker
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> libopencm3-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libopencm3-devel
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
libopencm3-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel

Reply via email to