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

247 Commits

Author SHA1 Message Date
Gaëtan Harter
1be5b7b10b
cpu: do not locally export compilation variables
These are already exported by `makefiles/vars.inc.mk`.
It is a prerequisite to allow handling compilation without global exports.
2019-08-29 10:35:53 +02:00
MrKevinWeiss
b0c05431f7 cpu/stm32: Fix 16 bit reg endianess for i2c_1
Since i2c_1 i2c_write_regs is cpu specific reg endianess must be swapped there
Change reg from little endian to big endian
2019-08-16 15:04:13 +02:00
fabian18
2c001f5a6c drivers/include/periph/eeprom: Changed uint8_t* to void* in API 2019-08-09 17:27:32 +02:00
Benjamin Valentin
b8c4ab5b69 cpu: make use of ARRAY_SIZE macro 2019-08-06 19:43:54 +02:00
51e40084c1
Merge pull request #11832 from fjmolinas/pr_optimize_pm_stm32l1
cpu/stm32l1: optimize power consumption
2019-08-06 09:34:07 +02:00
c2d81fc246
stm32-common/spi: add customizable gpio modes for spi pins 2019-08-05 16:46:41 +02:00
Francisco Molina
3cd72441bd cpu/stm32_common: minimize consumption for STM32L1
- With this PR all GPIOs are set as AIN on start up.

Co-authored-by: Oleg Artamonov <oleg@unwds.com>
2019-08-05 15:40:35 +02:00
d99879eb32
Merge pull request #11489 from fjmolinas/pr-update_stm32l1-cmsis
stm32l1/vendor: update vendor files to v2.3.0
2019-08-05 15:03:09 +02:00
f4d65e10cd
Merge pull request #11897 from fjmolinas/pr_stm32_common_define_alignment
cpu/stm32_common: uniformize define alignments
2019-08-05 11:27:36 +02:00
francisco
e4a49f023e stm321l1/vendor: migrate to new v2.3.0 vendor files
- remove old header files
- fix new DMA header file macro definitions
- remove old cpu type groups (STM32L1XX_MD, STM32L1XX_MDP,
  STM32L1XX_HD, STM32L1XX_XL)
2019-08-05 11:13:08 +02:00
Francisco Molina
c166b73e61 cpu/stm32_common: uniformize define alignments 2019-07-24 09:02:47 +02:00
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