Commit Graph

204 Commits

Author SHA1 Message Date
Karl Palsson
2092a6759d update libopencm3
This brings in the new ADC api for STM32 parts.

Update to new standardized ADC apis.
Drops pointless channel definitions, uses common names for common functions.
No functional changes.

Based on work in: https://github.com/libopencm3/libopencm3-examples/pull/130
2016-04-10 13:49:07 +00:00
Karl Palsson
b50cdb56de stm32f0: systick_blink: Robustness and correctness fixes
Update documentation and comments in code to reflect reality.
Ensure that GPIO pin output speed is actually set, to ensure that 48Mhz sysclk
output is functional.
Actually set AF, instead of relying on reset values.
Replace the systick code, the core of this example, with some code that has
less traps and surprises.  Instead of trying to get a direct interrupt x times
per second, and reguarly running into problems with the 24 bit counter limit,
use a method that triggers an interrupt every x ms instead.  Tested MCO and
blink rates with a logic analyser, properly verified working now :)
2016-04-07 22:04:03 +00:00
Karl Palsson
dfc4763ab3 scripts: import BMP helper scripts from library.
These should have been moved over when the library was initial split.
Even if we eventually drop any attempt at flash support, at least have all the
files here.
2016-02-29 21:33:22 +00:00
Karl Palsson
7bbc57df75 Drop explict M3 reference from readme.
While the library and project remain libopencm3, there's no reason to
explicitly limit things to M3 in the introductory text.
2016-02-08 14:07:54 +00:00
Fabian Bartschke
ec1d59e344 stm32f4-discovery: correct part number for alternatives
STM32F401 Discovery is labelled MB1115B:
http://www.st.com/stm32f401discovery
2016-01-21 00:08:11 +00:00
Karl Palsson
b22ea8b616 stm32f1: maple LED is on A5.
Fix incorrect RCC port.  Only applies to "maple" not to maple mini.

Fixes github issue #117
2016-01-11 10:01:22 +00:00
Zhiyuan Wan
7322fdcdb9 stm32f103: fix all usb driver
Correctly migrate stm32f103_usb_driver to st_usbfs_v1_driver instead of the
f107 driver.

Fixes: 976720c355
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2016-01-03 14:51:12 +00:00
Piotr Esden-Tempski
8ce9536b2e Added gitter chat badge. 2015-12-15 17:41:07 +01:00
Piotr Esden-Tempski
976720c355 Updated libopencm3 to current master. Made all examples compile again.
Be specifically careful with the usb examples. There is likely some
breakage to be expected, not sure I updated all the drivers to the
correct types for the respective chips.
2015-12-15 00:56:25 +01:00
Piotr Esden-Tempski
f0009c64dc Added some more files to gitignore. 2015-12-15 00:06:06 +01:00
Andrew Chen
2314635cf0 Makefile.include: don't override DEFS
Allow examples (such as usart-semihosting) to set DEFS for their own use,
and _then_ add the target definitions.
2015-12-10 15:51:57 +00:00
Karl Palsson
070e5bbb94 make: allow specifying OPENCM3_DIR on command line
Allow specifying the path to the library on the command line, without
editing the makefile
2015-10-21 15:19:53 +00:00
Karl Palsson
3a275fb601 make: respect OPENCM3_DIR variable
When checking for the existing of the library, respect the variable
that's defined instead of checking a hardcoded path.
2015-10-21 15:19:49 +00:00
Karl Palsson
393fe8e449 stm32: usb: register control handlers in config callback
As found in 6f2b39c1be6a8b9531264d92138dc2629d51cfa0, you can't just register a
control callback by itself, you can only register them in the set config
callback, (or, at least, _after_ set config has been done.

This has been compile tested only for the extra examples that were found to
have this failing pattern.
2015-08-23 15:02:34 +00:00
Jan
dd0e48369d stm32f1: fix h103 usbdfu example
This has been broken since f87170e when set config started clearing control
handlers to be re-registered by different configurations.

Fix this example to use a set config callback to setup control transfer
callbacks, just like CDC-ACM demos.  With this fix, this demo works with
dfu-tool 0.8

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2015-08-23 15:02:20 +00:00
Karl Palsson
a6c183d470 vf6xx: merge gpio/uart examples
The plain "uart" example was just a slightly less featured version.
Compile tested only!
2015-07-16 17:17:12 +00:00
Stefan Agner
1123768e78 vf6xx: add GPIO example
This example muxes two pins as GPIO and enables one GPIO (logical
high). The other GPIO is then read in the main loop. One can use
a jumper to bridge the two GPIOs to see that also reading succeeds.
2015-07-16 17:10:11 +00:00
Stefan Agner
0b9e7d0d5d vf6xx: add UART example
The UART's baud rate is calculated using the current clock
configuration from the clock module. This example makes use
of the standard C library and writes the characters to the
UART in blocking mode.
2015-07-16 17:10:11 +00:00
Karl Palsson
849bdc8001 build ti/nxp examples again
Note, lpc43xx still fails to build, so still disabled!
2015-07-16 16:56:32 +00:00
Karl Palsson
b7c04b4eee docs: try and clarify that you should look in other directories 2015-07-16 16:30:17 +00:00
Karl Palsson
a023b0a7ca stm32f1: rtc: drop redundant ld script
Now that this is known targetting h103 board, drop the duped ld script.
2015-07-16 16:28:07 +00:00
Karl Palsson
3a06a8d24c stm32f1: other: rtc example is actually for h-103 board
Move it into the directory already available for this board.
No code changes, just clarifies it a little bit
2015-07-16 16:25:46 +00:00
Ken Sarkies
697d4f307a STM32F1xx RTC example: Change usart_send to blocking form to allow time to send characters
Tested with ET-STAMP-STM32
2015-07-16 16:23:43 +00:00
Karl Palsson
b779843799 update library 2015-07-15 12:28:37 +00:00
Priit Laes
48b2f10e66 [BUILD] Report proper error when linker script cannot be found. 2015-06-28 22:53:55 +03:00
Karl Palsson
be988d74ca makefiles: clean should cleanup stylecheck as well. 2015-05-17 18:20:23 +00:00
Piotr Esden-Tempski
c6af45ba8f [nucleo-f411re] Stylefix. 2015-02-24 19:47:28 -08:00
Chuck McManis
d90d72291a USART with Standard I/O
This example takes advantage of the big Flash memory space and
uses the standard library functions printf, and fgets to
implement a simple interactive application.
2015-02-24 19:44:14 -08:00
Chuck McManis
4837775449 Nucleo F411RE - Simple USART example
Same as the one for other boards
2015-02-24 19:44:14 -08:00
Chuck McManis
8019726f51 Nucleo Examples F411RE 2015-02-24 19:44:14 -08:00
kbob
9cee61f089 [stm32f429i-discovery] Added LTDC DMA example.
This example is just using buffers and built in alpha overlay
functionality to animate a dmond floating on a checker board. After
initializing of the frame buffers only 7 registers are being modified to
implement the animation.
2015-02-24 17:14:57 -08:00
Piotr Esden-Tempski
408ba8c885 Updated libopencm3 to the newest version. 2015-02-20 20:51:59 -08:00
Chuck McManis
22f59c4583 LCD version of the Mandelbrot example
This version is the ASCII one but uses the LCD display
that is attached to the board for a more colorful result.

This example also zooms into a more "interesting" place in the set so
the display stays interesting during the full 100 generations.
2015-02-16 18:13:28 -08:00
Piotr Esden-Tempski
4de8d15303 [stm32f4-discovery] Using WFI instead of nop in the main loop.
WFI (Wait for Interrupt) tells the processor to suspend untill the next
interrupt is called. Better than burning away the cycles with nop.
2015-02-13 16:41:18 -08:00
Piotr Esden-Tempski
ec7c0f318b [stm32f4-discovery] Added timer example for the stm32f4 discovery board. 2015-02-13 16:41:18 -08:00
Piotr Esden-Tempski
5b26d350ff Updated locm3. 2015-02-13 16:36:15 -08:00
Piotr Esden-Tempski
51dda90570 [stm32f429i-discovery] Replaced the ctrl-c handler in console for a shorter version.
Thanks to ChuckM for that.
2015-02-05 16:34:36 -08:00
Piotr Esden-Tempski
8c6eb9ca57 [stm32f429-discovery] General sweep to fix style according to make stylecheck. 2015-02-04 20:39:32 -08:00
Piotr Esden-Tempski
c06aba1603 Removed the use of ITM_Sendchar. 2015-02-04 17:07:57 -08:00
Chuck McManis
0a863789b0 Additional cleanup on lcd-serial
Remove the ISR function and remains of the hack in lcd-spi.c and
convert console.c to use the LOC3 system reset code rather than
the hack which only works on the F4 as it turns out.
2015-02-04 16:48:36 -08:00
Chuck McManis
5379525a87 Updated the LCD SPI
Now that I know a bit more about how SPI is working on the STM32F4
I removed the egregious hack and replaced it with some cleaner code
for driving the LCD. On the positive side it gets a faster update
rate on the screen.
2015-02-04 16:48:18 -08:00
Chuck McManis
b76c30cdb0 Fixups 2015-02-04 16:34:03 -08:00
Piotr Esden-Tempski
d29e4d2b7c [stm32f429i-discovery] Moved Chucks remaining examples to the correct directory.
Additionally added Chucks readme to the stm32f429i-discovery board
readme.
2015-01-22 18:38:16 -08:00
Piotr Esden-Tempski
86c42bc2dd [stm32f429i-discovery] Switched over to UART1.
UART1 is connected through two jumpers to the programmer chip on the
board. Making the use of it very streight forward.
2015-01-22 18:27:28 -08:00
Piotr Esden-Tempski
d6cb05d792 [stm32f429i-discovery] Moved Chucks usart irq example to usart irq console.
Chucks irq example is more elaborate than the ported one so we keep
both.
2015-01-22 16:08:28 -08:00
Piotr Esden-Tempski
fbcb1ca66e [stm32f429i-discovery] Moved Chucks example to usart_console
Chucks example is more elaborate than the simple ported example so we
keep both.
2015-01-22 16:05:48 -08:00
Piotr Esden-Tempski
ed4bec540c [stm32f429i-discovery] Removed Chucks blink example. 2015-01-22 15:57:20 -08:00
Piotr Esden-Tempski
c18a16d979 [stm32f429i-discovery] Merge and delete systick blink example.
Added Chucks improvements to the systick example into the ported one.
2015-01-22 15:51:20 -08:00
kbob
7629bb01e6 Switched from USART 2 to USART 1. 2015-01-21 02:00:08 -08:00
Piotr Esden-Tempski
71b2c1991f [style] Trailing white space fixes. 2015-01-20 16:27:50 -08:00