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

236 Commits

Author SHA1 Message Date
Francisco Molina
128e6ed2c9 stm32_common/gpio: remove unused guard 2019-07-23 17:05:37 +02:00
francisco
1d03634407 stm32_common/stm32_mem_length: fix RAM_LEN for stm32l1xx-A/X cpu's 2019-07-09 08:56:35 +02:00
3881128884
cpu/stm32_common: extend memory lengths support 2019-07-08 09:09:46 +02:00
3f141e9184
Merge pull request #11314 from fjmolinas/pr_stm32l1_eeprom_null
cpu/stm32l1: fix issue when  writing NULL bytes to eeprom
2019-07-04 18:36:30 +02:00
francisco
8f1a835a59 stm32_common/eeprom: add _IO prefix to hardware access 2019-07-04 15:52:25 +02:00
francisco
f2f7fe1bab stm32l1/eeprom: fix eeprom write for cat 1 2019-07-04 15:51:32 +02:00
9e6d558596
stm32_eth: Code cleanup and some fixes
cpu/stm32_common: cleanup periph eth
boards/nucleo-f767zi: cleanup dependencies
boards/nucleo-f767zi: fix dma configuration attribute for eth
examples/default: add nucleo-767zi in boards with netif
drivers/stm_32_eth: Add header guard for eth_config

Co-authored-By: Robin <robin@chilio.net>
2019-07-04 15:27:50 +02:00
Robin
4729bea46e
stm32_eth: Multiple Improvements of the original codebase
stm32eth: Move to stm32_common periph
cpu/stm32_periph_eth: Rebase to current master branch

- Update DMA to use new vendor headers
- Update send to use iolist. It looks like the packet headers are now transfered as seperate iolist entries which results in the eth periph sending each header as own packet. To fix this a rather ugly workaround is used where the whole iolist content is first copied to a static buffer. This will be fixed soon in another commit
- If MAC is set to zero use luid to generate one
- Small code style fixes

cpu/stm312f7: Add periph config for on-board ethernet
boards/nucleo-f767zi: Add config for on board ethernet
tests/stm32_eth_lwip: Remove board restriction
boards/common/nucleo: Add luid module if stm32 ethernet is used
tests/stm32_eth_gnrc: Add Testcase for gnrc using the stm32 eth periph
stm32_eth: Rework netdev driver layour
tests/stm32_eth_*: Use netdev driver header file for prototypes
stm32_eth: Add auto init for stm32 eth netdev driver
boards/stm32: Enable ethernet conf for nucleo boards
stm32_eth_auto_init: Add dont be pendantic flag
stm32_eth: Remove dma specific stuff from periph_cpu.h

Looks like this was implemented in PR #9171 and 021697ae94 with the same interface.

stm32_eth: Remove eth feature from stm32f4discovery boards
stm32_eth: Migrate to stm32 DMA API
stm32_eth: Add iolist to module deps
stm32_eth: Rework send function to use iolist
stm32_eth: Fix ci build warnings
stm32_eth: Fix bug introduced with iolist usage
stm32_eth: Remove redundant static buffer
stm32_eth: Fix feature dependencies
stm32_eth: Fix wrong header guard name
stm32_eth: Implement correct l2 netstats interface
stm32_eth: Rename public functions to stm32_eth_*
stm32_eth: Fix doccheck
stm32_eth: Move register DEFINE to appropriate header file
stm32_eth: remove untested configuration for f446ze boards
stm32_eth: Move periph configuration struct to stm32_common
stm32_eth: Fix naming of eth_phy_read and eth_phy_write
stm32_eth: Remove obsolete test applications
2019-07-04 15:27:26 +02:00
5a62ec9798
Merge pull request #11790 from fjmolinas/pr_fix_wait_for_pending_isr
stm32_common/flash_common: fix _wait_for_pending_isr()
2019-07-04 11:28:50 +02:00
3f984a1128
Merge pull request #11776 from fjmolinas/pr_fix_stm32_flashpage
stm32_common/flashpage: fix stm32l4 erase error
2019-07-04 10:58:56 +02:00
francisco
24ea728007 stm32_common/flashpage: _wait_for_pending_operations() before write 2019-07-04 10:45:41 +02:00
francisco
7f675e9ca9 stm32_common/flash_common: properly clear EOP bit
- EOP bit is cleared by writing 1 to the register.
- Guard EOP bit clear for STM32F2, STM32F4, STM32F7
  and STM32L4 EOP bit is only set if EOPIE is enabled.
  Since this is not the case for any platform we exclude
  it when not needed.
2019-07-04 10:45:41 +02:00
59933d291b
Merge pull request #11758 from fjmolinas/pr_optimize_pm_stm32f
cpu/stm32: optimize stop mode for stm32f*
2019-07-04 10:36:24 +02:00
francisco
1b7a8611d8 cpu/stm32_common: minimize consumption for STM32F1
- With this PR all GPIOs are set as AIN on start up.
2019-07-03 16:50:21 +02:00
fjmolinas
940b80243f cpu/stm32_common: minimize consumption for STM32F0/2/3/4/7
- With this PR, On start up all GPIOs are configured as AIN. For stm32l0/4
  this is done by default. Doing this saves the consumption of the input Schmitt
  trigger in STOP mode which can reduce the consumption in at least 70%
  from current master.
2019-07-03 16:50:21 +02:00
francisco
26a8013502 stm32l4/flashpage: fix page erase
- The PNB in FLASH_CR wasn't cleared before every erase operation
  and the new value was just stacked on top. After a couple of erase
  the PNB written was overlapping with old ones failing to erase the
  correct page.
2019-07-03 09:30:06 +02:00
3b58b4b6b6
cpu/stm32f3: add support for flashpage 2019-06-28 17:16:10 +02:00
MrKevinWeiss
b5db0dab2d cpu/stm32/i2c: Fix error flag clearing in sr1
This commit fixes the clearing of a error condition after read.
This causes the incorrect errorcodes if the register is read
then an error occurs, then it is cleared.
By clearing only after the error is processed the bug is fixed.
This can be tested by reading a i2c slave that is not there.
2019-06-20 15:53:44 +02:00
francisco
46b90134ad stm32_common/flashpage: cleanup stm32l0/1
- Since writes are performed per word no actions need
  to be performed for flash access, and the FPRG doesn't
  need to be cleared.
2019-06-20 09:43:13 +02:00
francisco
5e709edb31 stm32_common/flashpage: remove repeated command 2019-06-20 09:31:48 +02:00
francisco
eb78d35096 stm32_common/flashpage: make implicit CPU_FAM defines explicit 2019-06-20 09:28:27 +02:00
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