1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

215 Commits

Author SHA1 Message Date
francisco
10875890e0 stm32_common/flashpage: use HSI only for stm32f0/1
- Before, HSI was enabled as the default case when it is only
  used for stm32f0 and stm32f1. It is now implemented explicitly
  for those platforms, and only those.
2019-06-20 09:27:26 +02:00
smlng
2de4b3011b periph_common: add as dependency to periph drivers
Rational: the periph_common module is required by (most) other periph drivers
and also during startup of the CPU/MCU to run periph_init. The latter is only
required if other periph drivers are used, hence periph_common should be a
depency of periph_* modules and *not* of the CPU/MCU. This PR fixes that
by making periph_common a depency of periph_* and removing the explicit
include in the CPU/MCU implementation.
2019-06-03 13:44:10 +02:00
eac6a54648
stm32_common/rtt: add support for stm32f7 2019-05-23 14:49:39 +02:00
5d63e28e59
Merge pull request #11425 from OTAkeys/pr/fix_stm32_uart_flow_control
cpu/stm32_common: set RTS when uart is off
2019-05-09 09:13:13 +02:00
Sebastian Meiling
a13d3c333a stm32_common/gpio: fix pin in gpio_init_init
Clearing pending interrupts and enabling them for a certain pin
used the wrong variable, this is fixed here.
2019-04-30 10:37:50 +02:00
Vincent Dupont
e9fd193969 cpu/stm32_common: set RTS when uart is off 2019-04-19 17:47:24 +02:00
75671ac208
Merge pull request #11355 from fjmolinas/pr_eeprom_wait_for_op
stm32_common/flash: move wait_for_pending_operation to flash_common
2019-04-12 13:36:01 +02:00
francisco
2c44cd4f70 stm32_common/flash: move wait_for_pending_operation to flash_common 2019-04-12 08:58:47 +02:00
Sebastian Meiling
4dd09eaa06
Merge pull request #6178 from OTAkeys/pr/can_stm32
can stm32: add a driver for STM32 bxCAN peripheral
2019-04-08 08:50:08 +02:00
Vincent Dupont
d283aaf8fd cpu/stm32_common: fix month encoding in RTC driver for alarm 2019-04-04 14:15:26 +02:00
Vincent Dupont
74ddf56171 tests/conn_can: build stm32 CAN drivers
Build can_stm32 module on boards which have a stm32 CAN controller.
2019-04-03 11:12:46 +02:00
Vincent Dupont
38b9ed1cac cpu/stm32_common: fix month encoding in RTC driver 2019-04-01 16:50:56 +02:00
Vincent Dupont
ae95137f95 can stm32: add a driver for STM32 bxCAN peripheral
This driver is compliant with the candev interface. It has been tested
with STM32F0 and STM32F2 and STM32F413 ONLY at this time but should be
compliant with other STM32Fx devices
2019-03-29 12:03:43 +01:00
9efd3c3660
stm32_common/rtc: reset RTC when clock source changed 2019-03-29 11:36:07 +01:00
fafc26819a
Merge pull request #10942 from OTAkeys/fix/stm32_uart_dma
cpu/stm32_common: fix DMA releasing in UART driver
2019-03-29 10:06:31 +01:00
Vincent Dupont
749b291273 cpu/stm32_common: fix rtt registers access 2019-03-27 16:43:00 +01:00
francisco
1a583844b8 stm32_common/i2c_2: fix unused *i2c when no DEVELHELP 2019-03-27 11:28:54 +01:00
Kevin "Bear Puncher" Weiss
d660888150
Merge pull request #11082 from OTAkeys/pr/stm32_i2c_2_restart_error
cpu/stm32_common/i2c_2: reset i2c when timeout during start condition
2019-03-25 13:20:11 +01:00
Vincent Dupont
dc5f58dcc8 cpu/stm32_common/i2c_2: reset i2c when timeout during start condition 2019-03-25 12:48:06 +01:00
MrKevinWeiss
2e37add109 cpu/stm32_common: Fix i2c_2 NACK stopping twice
There is an error when the start byte NACKs
The nack sets the stop bit twice which keeps the stop bit high the next time
When the stop bit is high it creates a timeout when trying to use
This commit fixes so when a NACK occures on the address it doesn't stop twice
2019-03-25 12:19:31 +01:00
d6fb676814
stm32l0/pm: clear wakeup flags when setting STOP mode. 2019-03-21 19:42:08 +01:00
2e0a818502
cpu/stm32: all stm32 families now provide pm support 2019-03-21 19:39:16 +01:00
738af9da51
cpu/stm32_common: add low-power modes for stm32f3 2019-03-21 19:39:16 +01:00
84f9f63ab8
cpu/stm32_common: implement low-power modes for F7 2019-03-21 19:39:16 +01:00
679fee7f9c
cpu/stm32_common: implement low-power modes for L4 2019-03-21 19:39:15 +01:00
d7b3091abc
Merge pull request #9521 from OTAkeys/pr/stm32f0_pm
cpu/stm32f0: add periph_pm support
2019-03-19 18:26:00 +01:00
Vincent Dupont
7590d528b8 cpu/stm32f0: add pm_layered support 2019-03-19 17:53:12 +01:00
Vincent Dupont
e83f27140a cpu/stm32_common: refactor pm implementation 2019-03-19 17:51:19 +01:00
Yegor Yefremov
ca8f74a0b0 cpu/stm32_common: use correct data bits macro
USART_CR1_M combines both USART_CR1_M0 and USART_CR1_M1 macros
affecting bits 12 and 28 on 7 data bits capable UARTs. Whereas
for other UARTs USART_CR1_M macro affects only bit 12.

This patch fixes wrong data bits usage on 7 data bits capable
UARTs with using USART_CR1_M0 macro for modes 8-E-x and 8-O-x.

It also simplifies bits unsetting as USART_CR1_M macro clears
all data bits related bits for both UART types.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-03-17 18:58:34 +01:00
francisco
e254235265 cpu/stm32_common: set ULP and regulator LP during stop/standby 2019-03-13 09:57:21 +01:00
francisco
4dda8abecb cpu/stm32l1: add support for STOP & STAND_BY mode 2019-03-13 09:57:17 +01:00
francisco
78c77c497a cpu/stm32_common: remove WKUP2 pin enable 2019-03-12 16:34:44 +01:00
Yegor Yefremov
97d0851de1 cpu/stm32_common: fix UART documentation
Don't include overridden typedefs into doxygen as otherwise,
they'll appear twice.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-02-06 12:46:27 +01:00
Vincent Dupont
2b6d0757f9 cpu/stm32_common: fix DMA releasing in UART driver 2019-02-04 14:26:39 -08:00
Yegor Yefremov
60f745a033 cpu/stm32_common: add support for uart_mode routine
Add support for specifying data bits, stop bits and parity at
runtime.

Introduce feature periph_uart_modecfg for uart_mode() till all
other CPUs implement it.

STM32 L1, F1, F2, F4 supports following modes:

* 7E1, 7E2
* 7O1, 7O2
* 8N1, 8N2
* 8E1, 8E2
* 8O1, 8O2

STM32 L0, L4, F0, F3, F7 supports following modes:

* 6E1, 6E2
* 6O1, 6O2
* 7E1, 7E2
* 7O1, 7O2
* 7N1, 7N2
* 8N1, 8N2
* 8E1, 8E2
* 8O1, 8O2

Use USART_CR1_M1 macro to detect 7-bit support because
even inside one family there could be devices that don't
support 7-bit mode. So just using a family macro is not
enough.

As stated in the datasheets for L0, L4, F0, F3, F7 devices,
data bits can only be changed when UART is disabled (UE=0).
Introduce uart_stop() routine to satisfy this requirement.

STM32 UART adds parity to the MSB of a byte to send. The same
also applies to the received bytes. As a result this bit must
be masked in order to get the pure data.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-01-31 14:15:20 +01:00
86c102e85b cpu/stm32_common: move dma attribute at end of config 2019-01-08 09:32:18 +01:00
Vincent Dupont
8c99edc18e cpu/stm32_common: fix UART ISR_TXE usage 2019-01-08 09:32:18 +01:00
Vincent Dupont
021697ae94 cpu/stm32_common: adapt DMA driver for f0/1/3/l0/1/4 2019-01-08 09:32:18 +01:00
b2c3df3381 cpu/stm32/gpio: power up port G with L4
Co-authored-by: Vincent Dupont <vincent@otakeys.com>
2018-12-27 14:15:25 +01:00
8449324cf8
Merge pull request #10610 from MrKevinWeiss/pr/fix/stmi2c1
cpu/stm_common: Refactor and cleanup i2c_1
2018-12-21 14:55:35 +01:00
Vincent Dupont
5e67986775 cpu/stm32_common/pm: use CPU_LINE for L053-specific code 2018-12-21 11:24:43 +01:00
MrKevinWeiss
f3b2a62c67 cpu/stm_common: Refactor and cleanup i2c_1
Refactor to use common read_regs.
Add error reporting and handling for unsupported low level commands.
Document hardware constraints.
2018-12-20 18:05:11 +01:00
ab061c4ae2
Merge pull request #10608 from MrKevinWeiss/pr/fix/stmi2c2
cpu/stm_common: Refactor and fix implementation for i2c_2
2018-12-20 13:51:39 +01:00
MrKevinWeiss
a2e059d18a cpu/stm_common: Refactor and fix implementation for i2c_2
Refactors i2c_2 to match the structure of i2c_1 better.
Corrects functionality issues.
Allows the common implementation of read_regs and write_regs.
Documents constraints of hardware.
Matches error messages with API.
2018-12-20 12:01:06 +01:00
Sebastian Meiling
c96021b039
Merge pull request #10637 from aabadie/pr/cpu/stm32_periph_gpio_common
boards*: move periph_gpio and periph_gpio_irq features from boards to cpu for STM32
2018-12-19 13:06:17 +01:00
Leandro Lanzieri
b32da1b13e
Merge pull request #10615 from MrKevinWeiss/pr/debug/init
cpu/stm32_common/uart: Prevent uart from sending if not initialized
2018-12-19 12:14:00 +01:00
da3bb42d18 cpu/stm32_common: define periph_gpio/irq features at cpu level 2018-12-18 21:50:34 +01:00
MrKevinWeiss
96f8438ea2 cpu/stm32_common/uart: Prevent uart from sending if not initialized
Due to the stdio getting called after periph_init the uart may send before initialized.
This adds a simple check so the uart does not get into a locked-up state.
2018-12-18 10:16:50 +01:00
Martine Lenders
a3864aa103
Merge pull request #9158 from aabadie/pr/periph/stm32_lpuart
cpu/stm32-common: add support for lpuart
2018-12-17 12:16:27 +01:00
MrKevinWeiss
d7eb070eb4 cpu/stm32f1: Add remap support for stm32f1 cpus and boards
This commit fixes configuration problems when trying to use i2c pins that need to be remapped.
All B8 and B9 pins for STM32F1 need to be remapped, so a check is done if the remappable pins are selected.
2018-12-14 09:16:37 +01:00