\ Program Name: blinky-1.fs for Mecrisp-Stellaris by Matthias Koch \ This program blinks a green led, it's the simplest of 'blinkies' \ Hardware: STM32F0 Discovery board \ Author: T.Porter \ Version 5183fa45 \ Enable GPIO's A,B,C,D and F in RCC_AHBENR 1 17 lshift 1 18 lshift 1 19 lshift 1 20 lshift 1 22 lshift + + + + $40021014 BIS! \ Set GPIOC_MODER_MODER9 to general purpose output mode %01 18 lshift $48000800 bis! \ Delay 500000 loops because the MCU is so fast, without it the LED would only appear dimly lit, with no visible flashing. : delay 500000 0 do loop ; \ Set GPIOC_BSRR_BS9 to 1 <-- note the BS9, This Sets GPIOC9 : green-led.on %1 9 lshift $48000818 ! ; \ Set GPIOC_BSRR_BR9 to 1 <-- note the BR9, This Resets GPIOC9 : green-led.off %1 25 lshift $48000818 ! ; : blink do green-led.on delay green-led.off delay loop ; \ enter "blink" to start the blinky, reset the board to stop it