230 Commits

Author SHA1 Message Date
Karl Palsson 15637e291b Update library to latest
This includes fixes for peripheral resets, introduced by library
changes:
* b3bdf025d7 stm32: i2c: drop i2c_reset()
* df654d7f28 stm32: spi: drop spi_reset()

Fixes: https://github.com/libopencm3/libopencm3-examples/issues/240
2023-01-16 20:39:31 +00:00
Karl Palsson 9577cd71eb stm32f0: eliminate outdated comments
Fixes: https://github.com/libopencm3/libopencm3-examples/pull/229
2021-11-17 12:48:23 +00:00
Piotr Esden-Tempski 3a8911627d Corrected the clock lookup table.
Due to copypasta we were using the hse table for hsi clocks.
2021-06-20 00:54:16 -07:00
Piotr Esden-Tempski 991bb45710 stm32f429i-discovery/spi: Fixed an OBO index bug. 2021-06-19 02:19:47 -07:00
Piotr Esden-Tempski 4cfc75f715 i2c_stts75_sensor: Replaced the depricated define with number. 2021-06-19 02:19:47 -07:00
Piotr Esden-Tempski 66d622aa7e Fixed an unintended fall through bug. 2021-06-19 02:19:47 -07:00
Piotr Esden-Tempski e599e34073 Updated all rcc_clock_setups to use the new lookup tables.
The old "one function per config" system is depricated for quite a while
now...
2021-06-19 02:19:47 -07:00
Piotr Esden-Tempski 02f48ef616 Corrected the linker script selection for l0 & l1 examples. 2021-06-19 02:19:47 -07:00
Piotr Esden-Tempski 520e7523ec Updated to the new DAC api. 2021-06-19 02:19:47 -07:00
Piotr Esden-Tempski 0bbafd690a stm32vl-discovery: Corrected linker script. 2021-06-19 02:19:30 -07:00
Santiago Piccinini 882f5b7d1b stm32: cdcacm: fix array out of bounds write
Remove debug leftovers that were causing memory corruption.
Writes of 64 or more bytes from the USB host side caused memory
corruption before this commit.
I've tested it in a STM32L4 board and it is working as expected.
2021-01-24 11:02:40 -03:00
Jeff Kent 4b4115fd72 stm32f429: lcd-dma: Fix LCD clock shift
RCC_DCKCFGR was missing a shift for register write
2020-12-19 00:29:47 +00:00
Karl Palsson 9830486509 stm32: standard bauds to 115200
See also be1d296 stm32: serial use 115200
In that commit we mostly replaced 38400, now we've cleaned up all of
them to be consistent.
2019-10-24 21:46:56 +00:00
Karl Palsson 6e12785c84 f1:h103: drop incomplete spi example 2019-10-24 21:30:22 +00:00
Karl Palsson 5a828ffb82 Update library
Use the now standard $(PREFIX)gcc form instead of with the -.
more consistent with other projects.
2019-06-07 21:31:44 +00:00
Karl Palsson be1d296e2f stm32: serial use 115200 baud rate
115200 is a much more sane "default" than 38400.
Instead of a mix of 38400 and 115200, just use 115200 in all places.
There's no reason for modern 32bit cpus to be using such old slow
baudrates.

Tested on f1, f4, l1.  Replaced some old f1 code that predated some
library support code for this.
2019-06-02 20:51:42 +00:00
Karl Palsson e0f377fec0 stm32f4: use new rcc_clock_setup_pll()
Batch replaced to use new api.  User code doesn't need this, but
examples should be up to date, and this avoids deprecation warnings.
2019-06-02 20:39:56 +00:00
Karl Palsson 4f4e6f9ef2 stm32f4: use 168MHz instead of intermediate 120MHz
120MHz is being removed in the library.
2019-06-02 16:02:43 +00:00
Karl Palsson fed62e7ef4 stm32l1: button-irq-printf: add syscfg clock.
Not strictly required as we're using port A out of the box, but makes
for bad example code, when the syscfg clock is required for selectin
exti sources other than port A.
2019-06-01 16:20:13 +00:00
Karl Palsson c9fe1da748 stm32l4: include missing makefile
Fixes: b8b97209 stm32l4: basic uart/exti/led/clock demo

which introduced the l4 example, but left out the makefile.include file
and didn't add it to the root build.

Reported at: https://github.com/libopencm3/libopencm3-examples/pull/193/commits/2a7e4fac1438519d0a8ec83bfc1400795c562fe0
2019-05-27 11:23:46 +00:00
Karl Palsson 90262eb880 stm32-h103: use proper HSE for USB
HSI is out of spec for reliable USB operation, even though it sometimes
works.  stm32-h103 board has an 8Mhz external crystal which should
therefore be used for any USB work.

Originally reported as https://github.com/libopencm3/libopencm3-examples/pull/192
2019-04-21 21:50:42 +00:00
Karl Palsson b7aac4bc76 stm32f4/usart: use 115200 baud rate
38400 is uncommon and slow.  Just live in the modern world of at least
115200.
2018-10-07 13:43:21 +00:00
Karl Palsson dc2142b729 rules: attempt rebuild of library of not found
Based on https://github.com/libopencm3/libopencm3-examples/pull/90
2018-08-29 11:54:43 +00:00
Karl Palsson f09dd550fd tiva/lm4f: drop unnecessary externs
These were added to the library as for other usb drivers.
2018-08-29 10:32:56 +00:00
Karl Palsson 3527ce407e stm32f3: usb: use proper clocks
Don't use the HSI clock, that's not specced for USB use.
Also, drop the unnecessary delays that were working around old bugs.
2018-08-29 10:32:56 +00:00
Karl Palsson 8faca31dc5 stm32f3: update examples for new library code 2018-08-29 10:32:56 +00:00
Nicolas Schodet 5b30e3d98d Fix usage of USB_VBUS
USB_VBUS is not an alternate function, it is an additionnal function which is
always enabled.

If configured as an alternate function, it will draw current from VBUS.
2018-07-03 22:42:44 +00:00
Markus Barenhoff ce364386d6 stm32f429: allow using all of ram 2018-07-03 22:38:04 +00:00
Karl Palsson fe6a2b5f13 make clean: avoid bashisms in favour of posixy forms.
Got a little too clever.
2018-06-08 09:53:09 +00:00
Karl Palsson 21ce202a07 properly clean .d files
And also, _only_ clean our own files, not both a hard list of all files,
just the ones we built ourselves
2018-06-07 11:42:44 +00:00
Karl Palsson 4ddb9db8b9 update linker scripts to use common generic files 2018-05-02 11:01:28 +00:00
Karl Palsson 8c6c8720bf stm32f3: cdcacm: fix grossly misleading comments 2018-05-01 22:14:26 +00:00
Karl Palsson 301b4f9194 update usb enum return codes
Should have been fixed in commit 85be1e5e7b when we updated the library, but was... missed.
travis caught it after the fact at least.
2018-03-04 13:57:29 +00:00
Karl Palsson b8b9720926 stm32l4: basic uart/exti/led/clock demo
No miniblink, let people interpret a more useful example.
2018-03-04 00:24:39 +00:00
Karl Palsson 85be1e5e7b update to current library
Minor api changes required.
2018-03-03 21:42:52 +00:00
Peter Mortensen 6e71b9dea8 stm32f0: miniblink: update comments to match code
Brought the comments up to date wrt. the actual code (inconsistency removed).
2018-01-08 10:02:47 +00:00
Paul Fertser f4e129cd4a rules.mk: Add cross-reference to the map file
This adds a section to the bottom of the .map file containing the
symbol->object file mapping.  (the logical inverse of the existing
section at the start of the .map file that lists objects, and the
symbols that pulled them in)

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2017-12-18 12:28:52 +00:00
Paul Fertser 6dbc067b3e Add maximum debugging info to ELF; doesn't affect binary size 2017-12-18 12:17:50 +00:00
Karl Palsson f368819e81 Update to current master library
can fixes are compile tested only.  I don't have those boards.
f3 i2c is tested on i2c and gives the same results
l1 low power demo seems to have been broken for some time already.
 => should be fixed, but not something I'm going to work on right now.
2017-09-01 23:19:46 +00:00
Karl Palsson d6876b1f77 f3:i2c: use printf and update docs
Preparations for updating the tree was making sure the existing example
worked :)
2017-09-01 23:01:56 +00:00
Jelmer Tiete 2107faf5ee rules: drop broken stlink util support
There was an attempt at providing support for the texane/stlink utility.
It has been broken for a long time, referring to missing scripts.
Remove it as clearly unused.
2017-08-25 14:58:41 +00:00
Jelmer Tiete 1f322c1cef rules: flash target helpers had broken script paths 2017-08-25 14:58:20 +00:00
Sergey Alirzaev fc60651b6a stm32f4-discovery: add new board revision 2017-08-25 14:55:45 +00:00
Chuck McManis 766f89c724 Better Debugging in make
This commit does two things, it removes the "Quiet" flag
from the flash target so you can see what it is trying to
do when it trys to flash your code, and it adds a make
target print-% which can be used to print the resolved
value of make variables (also helpful in figuring out
what it is trying to do).
2016-12-29 15:38:50 +00:00
Karl Palsson c03b580722 stm32: morse timer: remove WFI where not critical
__WFI is not standardized, though often provided.  As it's not a core
part of this example, drop it.
2016-12-17 00:24:36 +00:00
Karl Palsson 9af2b8c7fb stm32: morse timer: standardize example
Simplify, clarify and synchronize the two morse LED blinker examples.
Prepare for one day extracting the core as common morse example code.
2016-12-17 00:23:10 +00:00
Karl Palsson d2abd471a5 stm32: timer: further clarify example commentary
The "timer" example is actually "the same" for both f1 and f4.  Do a
sanity sweep over the commentary, remove all vestiges that this was
cloned from a motor control example, and synchronize both examples.

Future work should extract the common portions "somewhere" but at least
make them consistent for now.
2016-12-16 22:41:15 +00:00
Valentin Ochs da04ccdf71 stm32: timer: Clarify some misleading comments.
Start clearing up misleading/redundant commentary.
2016-12-16 22:35:22 +00:00
Karl Palsson 1260b16772 timer_reset -> rcc_periph_reset_pulse() replace
timer_reset wasn't fully implemented for all timers on all series, and
was simply a wrapper of the RST bits in the RCC registers anyway.

First part of https://github.com/libopencm3/libopencm3/issues/709
2016-12-16 21:32:36 +00:00
Karl Palsson 833da68c18 f1: h103: drop duplicate usb_hid example.
This example was functionally similar to the "other" example, but had
the actual functional mouse movement disabled.  To reduce maintennance
cost with slightly divergent examples, simply drop the less useful
example.
2016-12-16 21:27:25 +00:00