Most peripheral headers simply include <libopencm3/stm32/memorymap.h>
which, like the rest of libopencm3 requires the correct compiler define
flag to be set. A few peripherals were directly including the platform
include, libopencm3/stm32/xx/memorymap.h, and in some of those cases it
wasn't even correctly including the correct platform. (Likely the
result of copy/paste errors)
These direct includes have been eliminated
Clearing a single bit in DMA_CCR, then immediately writing a 0 over the
entire register is completely redundant on the F1, F3 and L1 DMA
peripherals. (Unlike the F2 & F4 DMA Peripheral, where this is
required)
Add an example using the RTC to help with a lower power design. This is
a sister example to the existing "button-irq-printf", which is
functionally identical, but uses far less power.
There's more tricks that can be done to lower the power even further,
but this shows a few of the early steps that can be done, using the RTC
wakeup instead of a timer.
Add the register definitions and some of the most basic helper functions
for the new style BCD RTC module found on the F2, F4, L1, F3 and F0.
This tries to keep as close to HACKING_COMMON_DOC as possible, while
maintaining sane names.
Code added for L1 to support the PWR Control block didn't properly
follow the HACKING_COMMON_DOC guidelines. The naming was wrong, and
some headers were missing. This commit has no functional changes, it
only addresses the style and structure problems.
Earlier additions to the L1 support were not correctly using linux
coding guidelines as specified in /HACKING.
Some examples were also missing license information.
Fixes#51
There should be no reason for manually trying to load the stack. Cortex
devices can be programmed with only C, and any code that needed this
would indicate broken vectors.
the "make clean" target showed a constant "stm32/f1" debug message
instead of the current relative directory. this is fixed by showing the
relevant portion of the current directory instead, relevant being
determined by evaluating the current makefile's relative position and
stripping that part off.
Flashes the Red, Green and Blue diodes on the board, in order. The system clock
starts at 80MHz.
Pressing SW2 toggles the system clock between 80MHz, 57MHz, 40MHz ,20MHz, and
16MHz by changing the PLL divisor.
Pressing SW1 bypasses the PLL completely, and runs off the raw 16MHz clock
provided by the external crystal oscillator.
The LEDs will toggle at different speeds, depending on the system clock. The
system clock changes are handled within the interrupt service routine.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Instead of setting and clearing RGB pins by PINx constants, define more readable
constants such as RGB_RED, and RGB_PORT.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Add an abstraction layer to handle the clock control for the run time clock on
LM4F (RCC). Sleep and deep-sleep clock configuration is not handled.
Complete documentation for the clock control API is included in doxygen-style
comments, and is included in [doc].
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Conflicts:
lib/lm4f/Makefile
The enum definitions are specified in the form
31:5 register offset from SYSCTL_BASE for the clock register
4:0 bit offset for the given peripheral
The names have the form [clock_type]_[periph_type]_[periph_number]
Where clock_type is
RCC for run clock
SCC for sleep clock
DCC for deep-sleep clock
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>