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

4442 Commits

Author SHA1 Message Date
Dylan Laduranty
c3c810b36e
Merge pull request #11655 from benpicco/same5x-fix_clock
cpu/samd5x: CPU init fixes
2019-06-21 09:44:54 +02:00
MrKevinWeiss
6419a7a3aa cpu/kinetis/i2c: Fix false positive for expected EIO during i2c write
This fixes the positive result when master write data is NACKed.
This false positive occurs when the write frame is finished but a data nack occurred.
The AF check should occur first.
2019-06-20 16:32:25 +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
Benjamin Valentin
f29ca155d8 cpu/samd5x: fix CPU init
There were still some things wrong with samd5x CPU init which only
showed up when used in conjunction with RIOTBOOT, that is cpu_init()
was called twice.

 - gclk_connect() should block until the GCLK is ready.
 - DPLL should be disabled dring configuration.
 - make sure not to use DPLL for MCLK when re-configuring DPLL
 - All APBxMASK bits should be in a defined state.
 - always enable 1kHz oscilator output.
2019-06-20 11:29:05 +02:00
a671c6c247
Merge pull request #11715 from fjmolinas/pr_stm32_flashpage_cleanup
stm32_common/flashpage: cleanup
2019-06-20 10:03:18 +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
Thomas Stilwell
c2d98f9648 cpu/efm32/periph_gpio: fix wrong GPIO_IntDisable() in gpio_init_int() 2019-06-19 00:52:14 -07:00
Thomas Stilwell
5c8bf483e7 cpu/efm32/periph_gpio: fix NUMOF_IRQS off-by-one error 2019-06-18 16:46:35 -07:00
francisco
4acceefa65 cortexm_common/Makefile.include: set RIOTBOOT_HRD_LEN for cortex-m
- Since the Vector table must be naturally aligned to the next power
  of two of the amount of supported ISR, and the table will be
  placed after riotboot_hdr, we must ensure RIOTBOOT_HRD_LEN has the
  same alignment.
2019-06-18 15:11:05 +02:00
Benjamin Valentin
d6b8df1ff7 cpu/samd21: allow to use XOSC32K for GCLK2
GCLK2 is needed by RTC/RTT, so make it possible to configure it with
XOSC32K as source.
2019-06-18 13:20:04 +02:00
Benjamin Valentin
7928c74e26 sam0_common: rtc/rtt: don't setup oscilators
leave that to cpu.c
2019-06-18 13:20:04 +02:00
Benjamin Valentin
c9c3cb84bf cpu: saml1x/saml21: setup 32kHz Oscilator in cpu.c
Clock setup does not belong in the peripheral driver.
2019-06-18 13:20:04 +02:00
Benjamin Valentin
46565ad339 cpu: saml1x/saml21: reduce differences in cpu.c
The init code for both MCUs is so alike, but it diverged over time.
Re-order the code, so that it's the same on both families again.
2019-06-18 13:20:04 +02:00
18bb31c38e
Merge pull request #11643 from fjmolinas/pr_stm32l4_riotboot
boards/nucleo-l476rg: add riotboot
2019-06-14 16:50:28 +02:00
Gaëtan Harter
90a9adbbda
cpu/esp*: append to FLASHDEPS
Append to FLASHDEPS instead of overwriting/lazy setting it.
2019-06-14 15:58:36 +02:00
Kevin "Bear Puncher" Weiss
f44740ea5b
Merge pull request #11648 from cladmi/pr/esp/use_flashfile
cpu/esp*: use FLASHFILE for esp32 and esp8266 boards
2019-06-14 15:04:49 +02:00
ab05e63175
nrf52: Add USB device peripheral driver 2019-06-11 14:14:36 +02:00
Gaëtan Harter
632da8ae0a
Merge pull request #11562 from fjmolinas/pr_kinetis_riotboot_frdm_kw41z
boards/frdm-kw41z-k64f: add riotboot
2019-06-07 19:49:08 +02:00
Benjamin Valentin
f375b00ff3 cpu/samd5x: add support for samd5x/same5x MCUs
This adds supoprt for the Atmel SAMD51 & SAME54 SoC.
The SAME5x/SAMD5x is a line of Cortex-M4F MCUs that share peripherals
with the samd2x Cortex-M0+ and saml1x Cortex-M23 parts.
2019-06-06 16:47:11 +02:00
Benjamin Valentin
3cd119a6e6 cpu/sam0_common: import vendor files for samd51
Atmel Software Framework (ASF) provides a set of low-level header files
that give access to different hardware peripherals of Atmel's ICs.

Origin: Atmel SAMD51 Series Device Support (1.1.96)
License: Apache-2.0
URL: http://packs.download.atmel.com/Atmel.SAMD51_DFP.1.1.96.atpack
2019-06-06 16:47:11 +02:00
Benjamin Valentin
cb9624909f cpu/sam0_common: import vendor files for same54
Atmel Software Framework (ASF) provides a set of low-level header
files that give access to different hardware peripherals of Atmel's
ICs.

Origin: Atmel SAME54 Series Device Support (1.0.87)
License: Apache-2.0
URL: http://packs.download.atmel.com/Atmel.SAME54_DFP.1.0.87.atpack
2019-06-06 16:47:11 +02:00
Dylan Laduranty
a37c0ccf70
Merge pull request #11610 from benpicco/sam0-timer_fix
sam0/timer: various fixes
2019-06-06 16:04:34 +02:00
Kevin "Bear Puncher" Weiss
002e033f5e
Merge pull request #11612 from ben-postman/pr_cc26x0_uart_mode
cpu/cc26x0: implement uart_mode()
2019-06-06 15:43:07 +02:00
Benjamin Valentin
f36d54f239 sam0/timer: various fixes
This cleans up the sam0 timer driver:

 - remove the check for the unused freq parameter
 - the MCU provides dedicated SET/CLR registers to avoid
   read-modify-write, so don't do read-modify-write on them.
 - workaround a possible hardware bug on SAMD5x:
   loop until the CMD_READSYNC is really set
2019-06-06 15:38:55 +02:00
francisco
42b1118f94 boards/frdm-k64f add riotboot support 2019-06-06 15:20:36 +02:00
Gunar Schorcht
563c41f191
cpu/esp8266: use FLASHFILE variable
Use ELFFILE as FLASHFILE as all files are created from this
one using esptool.
2019-06-06 14:59:24 +02:00
Gunar Schorcht
98d64dafef
cpu/esp32: use FLASHFILE variable
Use ELFFILE as FLASHFILE as all files are created from this
one using esptool.
2019-06-06 14:59:24 +02:00
Ben Postman
9a000cf4e6 cpu/cc26x0: Implement uart_mode()
This change required correcting the values for  LCRH_PEN and LRCH_EPS
values defined in cc26x0_uart.h, as they  were incorrect according to
19.8.1.7 of the TI CC26x0 reference manual.

on-behalf-of: @sparkmeter <ben.postman@sparkmeter.io>
2019-06-06 08:46:33 -04:00
francisco
4ca815445d kinetis/Makefile.include: set RIOTBOOT_HDR_LEN to 0x200 for KW2XD
- Minimum required RIOBOOT_HDR_LEN or kW2xD is 0x200
  to respect vector table alignment
2019-06-06 11:59:01 +02:00
francisco
4611725e95 stm32l4/Makefile.include: set RIOTBOOT_HDR_LEN to 0x200
- Minimum required RIOBOOT_HDR_LEN or stm32l4 is 0x200
  to respect vector table alignment
2019-06-06 11:54:12 +02:00
francisco
21d7ecaac0 cpu/stm32l4: add CPU_FLASH_BASE 2019-06-06 11:49:25 +02:00
Gaëtan Harter
bbb6dec054
Merge pull request #11630 from fjmolinas/pr_kinetis_ld
kinetis/ldscript: handle _rom_offset
2019-06-05 16:12:25 +02:00
francisco
1e0f44c28a kinetis/Makefile.include: cleanup unused LINKFLAGS
- _rom_start_addr, _ram_start_addr, _rom_length and _ran_length are
  already defined in cortexm_common/Makefile.included and can therefore
  be removed from kinetis/Makefile.include
- _ram_base_addr is never used and was not in commit history so
  is also removed
2019-06-04 18:11:55 +02:00
francisco
f0311ce1fa kinetis/ldscript: include _rom_offset
- To be able to flash at an offset the vector table must be
  relocated accordingly to the IMAGE_OFFSET, therefore linkage
  needs to take the offset into account.
2019-06-04 18:05:35 +02:00
francisco
43182bd8f7 cortexm_common/ldscript: use cortexm_rom_offset.ld 2019-06-04 18:05:35 +02:00
francisco
1e5a485539 cortexm_common/ldscript: add common script for rom_offset calculation 2019-06-04 18:05:35 +02:00
Gaëtan Harter
fcd7f2233a
Merge pull request #11615 from cladmi/pr/cpu/atmega_common/ldscripts_compat/doc
cpu/atmega*/ldscripts_compat: add command to generate ldscript
2019-06-03 16:49:38 +02:00
Gaëtan Harter
40e7dd3e6b
cpu/atmega*/ldscripts_compat: add command to generate ldscript
Add the command to generate the ldscript in the documentation.
It was only in the commit message before and had a typo 's/--mmcu/-mmcu/'.
2019-06-03 16:11:19 +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
b92f6a424a
Merge pull request #11502 from dylad/pr/saml21_pl2
cpu/saml21: set PL2 by default
2019-06-03 12:30:41 +02:00
Juan I Carrano
0d88de90c3
Merge pull request #11591 from benpicco/noinit_move
ldscripts: move .noinit section behind .bss section
2019-05-31 18:23:00 +02:00
dylad
f7ee2d2e15 cpu/saml21: set PL2 by default 2019-05-30 21:51:13 +02:00
Leandro Lanzieri
bf1b38aabe
Merge pull request #11503 from MrKevinWeiss/pr/cc2538/uartmode
cpu/cc2538: Add periph_uart_mode implementation
2019-05-29 16:00:09 +02:00
Juan I Carrano
245f04a33d
Merge pull request #11545 from cladmi/pr/kinetis/flash_no_arm_toolchain
cpu/kinetis: allow flashing without toolchain
2019-05-29 13:51:30 +02:00
Kevin "Bear Puncher" Weiss
4922321f1f
Merge pull request #11585 from fedepell/i2c_reg_endianess_2
periph/i2c: handle i2c register write/read helper function correctly in big endian
2019-05-29 11:54:24 +02:00
Federico Pellegrin
617124792c efm32/i2c: make sure 16-bit register access is done in big endian 2019-05-29 11:29:11 +02:00
Gaëtan Harter
dedbe9c737
Merge pull request #11554 from cladmi/pr/make/exports/remove_flash_debug_reset
make: remove exports for flash debug reset
2019-05-28 18:15:03 +02:00
Gaëtan Harter
e40d569204
kinetis: save 'wdog-disable.bin' binary in the repository
Keep the compiled '.bin' file to remove the need to compile it when
flashing. This remove the need to have the toolchain when flashing so
allow compiling and flashing with `BUILD_IN_DOCKER=1` without a local
toolchain.

Even if it ends up storing a binary, the file is only 34 bytes.
2019-05-28 14:37:11 +02:00
Gaëtan Harter
984cbc7e41
cpu/kinetis/check-fcfield: use OBJDUMP
Get OBJDUMP from the environment instead of hardwriting the value.

This is a prerequisite to allow using `objdump` when building from docker
when not having the `arm` toolchain installed.
2019-05-28 14:36:37 +02:00
francisco
c219fdc001 kinetis/check-fcfield: skip on IMAGE_OFFSET > 0x410
- fcfield is located in memory at 0x400-0x40f. Its content is only read
  upon reset, therefore if in presence of a bootloader and multiple
  applications, the fcfield will only be read when the bootloader
  is loaded. As long as we flash at IMAGE_OFFSET > 0x410 we do not
  care about the fcfield content since it won't get overwritten.
2019-05-28 10:19:00 +02:00
Gaëtan Harter
79280eb12e
boards/tools: remove exporting PREFLASH/FLASHDEPS
PREFLASHER/PREFFLAGS/FLASHDEPS are evaluated by the main Makefile.include.
Their value does not need to be exported.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `16 insertions(+), 16 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE` plus the newline that is said to have
changed.
2019-05-28 09:58:40 +02:00
Gaëtan Harter
ac113ca2f8
boards/tools: remove exporting FLASHER/FFLAGS
FLASHER and FFLAGS are evaluated by the main Makefile.include or by file
included by it. Their value does not need to be exported.

This will also prevent evaluating 'PORT' for FFLAGS when not needed.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `84 insertions(+), 84 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
2019-05-28 09:56:00 +02:00
francisco
7156977fed kinetis/check-fcfield: add fcfield verirication for bin files 2019-05-27 17:43:19 +02:00
francisco
963bbe75ba kinetis/check-fcfield: merge hex and elf script 2019-05-27 17:38:46 +02:00
Benjamin Valentin
7415e0590e sam0_common: spi: use sercom_set_gen() instead of re-implementing it
Don't repeat yourself and introduce errors in doing so.
2019-05-25 19:13:53 +02:00
Benjamin Valentin
84233ce5d5 sam0_common: replace sercom_id() calculation with switch statement
As the sercom_id() function grows it gets more unweidly.
Let's replace it with a simple switch statement that is true for all
sam0 parts.
2019-05-25 19:12:55 +02:00
Benjamin Valentin
31f88a2d0e sam0_common: periph/spi: use sercom_clk_en/dis()
Use already existing functions to turn on / off SERCOM clocks instead
of replicating the functionality in the driver.
2019-05-25 19:09:32 +02:00
1dcd3b6a08
Merge pull request #11563 from dylad/pr/saml1x/pm_layered
saml1x: enable pm_layered by default
2019-05-24 18:33:37 +02:00
Dylan Laduranty
0da43ba4ee cpu/saml1x: set custom PM_BLOCKER_INITIAL 2019-05-24 16:40:08 +02:00
Thomas Perrot
b63121c588
board: add support for arduino-leonardo 2019-05-24 15:12:47 +02:00
Thomas Perrot
44803ea4fd
cpu/atmega32u4: add support for ATmega32U4 2019-05-24 15:12:47 +02:00
35d43ccdc6
Merge pull request #11440 from maribu/arm7_barriers
cpu/arm7_common: Make irq_*() compiler barriers
2019-05-24 11:05:13 +02:00
Gunar Schorcht
2c555a72ec cpu/esp8266: print_meminfo function added 2019-05-24 00:28:57 +02:00
Gunar Schorcht
501d679f67 cpu/esp8266: fix of printf format identifiers
Format identifier `h` and `hh` removed since `esp_printf` does not support them.
2019-05-24 00:28:24 +02:00
Gunar Schorcht
46ea36ff52 cpu/esp8266: fix of esp_hexdump function
A space was mission after each field.
2019-05-24 00:28:24 +02:00
eac6a54648
stm32_common/rtt: add support for stm32f7 2019-05-23 14:49:39 +02:00
Sebastian Meiling
6b16df0dfd
Merge pull request #11453 from maribu/atmega_naked
cpu/atmega_common: Fix function attributes
2019-05-23 12:14:33 +02:00
Dylan Laduranty
aba9405dd4 saml1x: enable use for pm_layered 2019-05-22 17:04:55 +02:00
Dylan Laduranty
f6ba7ee106 sam0: correct number of PM for SAML10 2019-05-22 17:04:27 +02:00
Sebastian Meiling
6b56a104b7
Merge pull request #9908 from jia200x/pr/fix_uninitialized
cpu/lpc1768: fix uninitialized variable
2019-05-22 14:32:00 +02:00
Jose Alamos
840d8714e2 cpu/lpc1768: fix uninitialized variable 2019-05-22 13:42:07 +02:00
Dylan Laduranty
85d37bb94f
Merge pull request #11336 from benpicco/sam0-timer
sam0_common: make Timer implementation common across all sam0 MCUs
2019-05-21 12:13:39 +02:00
Benjamin Valentin
849dd4cdce sam0_common: make Timer implementation common across all sam0 MCUs
The currently supported SAM0 MCUs (samd21, saml21, saml1x) share the same
Timer peripheral, yet each of them carries it's own copy of the Timer
driver.

This introduces a new timer driver that is common for all sam0 MCUs and
uses structs for configuration instead of defines.
2019-05-21 11:47:59 +02:00
13cc513f30
cpu/stm32l0: add support for stm32l052xx 2019-05-21 09:54:35 +02:00
Benjamin Valentin
1c3f96495d ldscripts: move .noinit section behind .bss section
If the .noinit section starts at the beginning of the RAM,
a bootloader that is unaware of it will clear it.
Instead, move it behind the .bss section, hoping that a bootloader
will always use less .bss memory than RIOT proper.
2019-05-16 23:11:45 +02:00
Semjon Kerner
65b709aaa7 cpu/nrf5x/radio/nrfmin: apply errata workaround 2019-05-15 14:49:42 +02:00
Semjon Kerner
22b5f8a41a cpu/nrf5x/radio/nrfmin: wait for state transition 2019-05-15 14:49:42 +02:00
Semjon Kerner
1954807309 cpu/nrf5x/radio/nrfmin: explicit test for power mode 2019-05-15 12:32:14 +02:00
bf000a1fa5
Merge pull request #11514 from kaspar030/fix_c11_atomic_definitions
core: fix c11 atomic definitions (fix gcc9 compilation)
2019-05-15 12:29:23 +02:00
MrKevinWeiss
0aa6b04249 cpu/cc2538: Add periph_uart_mode implementation
This commit adds the periph_uart_mode USEMODULE
It implements all functionality defined in the common uart driver
This means all parity modes, data bits, and stop bits
2019-05-15 09:26:56 +02:00
Juan I Carrano
e4bc5d4718
Merge pull request #11521 from benpicco/cortexm_common-noinit
cortexm_common: add .noinit section
2019-05-14 13:13:21 +02:00
Kevin "Bear Puncher" Weiss
e40f483acf
Merge pull request #11261 from gschorcht/cpu/esp32/doc_fix/rom
boards/cpu/esp32: doc fix of built-in ROM size
2019-05-14 13:07:50 +02:00
Benjamin Valentin
29bf6c712b cortexm_common: add .noinit section
Make it possible to specify a section of RAM that is not touched by
the init routing so data can be kept across resets.

This should behave the same as on atmega & lpc2387.
2019-05-14 12:10:27 +02:00
Leandro Lanzieri
44d981947d
Merge pull request #11293 from gschorcht/cpu/esp32/periph/conf/spi
boards/esp32: changes the approach for configurations of SPI interfaces in board definitions
2019-05-14 12:07:19 +02:00
d85d96685f
Merge pull request #11518 from fjmolinas/pr_nrf52dk_bootloader_length
cpu/nrf52: set RIOTBOOT_LEN to 8k
2019-05-14 10:59:27 +02:00
francisco
de3314334e cpu/nrf52: set RIOTBOOT_LEN to 8k
- nrf52 flash page is 4k, the bootloader needs to be x2 so slots
  start at the beginning of a page.
2019-05-13 21:47:14 +02:00
68a4099c1c cpu/cortexm: fix pointer calculation
gcc9 started realizing that _sram is basically an uint8_t[1] and thus
HARDFAULT_HANDLER_REQUIRED_STACK_SPACE cannot be added to it without
exceeding the one-sized array.

This commit casts _sram to (uintptr_t) where that happens.
2019-05-13 17:38:10 +02:00
Leandro Lanzieri
ab6d0fe08c
Merge pull request #11292 from gschorcht/cpu/esp32/periph/conf/pwm
boards/esp32: changes the approach for configurations of PWM channels in board definitions
2019-05-13 16:11:05 +02:00
Juan I Carrano
cbc08edcd1
Merge pull request #11358 from fjmolinas/riot-cortexm-address-check
cpu/cortexm_common: function to check address validity
2019-05-13 11:50:48 +02:00
Igor Knippenberg
dbd8c2774f cpu/nrf52: i2c bugfix 2019-05-13 11:32:57 +02:00
Oleg Artamonov
a5ce6deb02 cpu/cortexm_common: function to check address validity 2019-05-13 09:35:34 +02:00
Benjamin Valentin
077056b949 sam0_common: make RTT implementation common across all sam0 MCUs
The currently supported SAM0 MCUs (samd21, saml21, saml1x) share the
same RTC peripheral, yet each of them carries it's own copy of the RTT
driver.

Unify the drivers and move them to sam0_common.
2019-05-09 20:54:00 +02:00
Kevin "Bear Puncher" Weiss
6afb0603aa
Merge pull request #11291 from gschorcht/cpu/esp32/periph/conf/i2c
boards/esp32: changes the approach for configurations of I2C in board definitions
2019-05-09 08:26:01 -07:00
Kevin "Bear Puncher" Weiss
795ad18f2e
Merge pull request #11294 from gschorcht/cpu/esp32/periph/conf/uart
boards/esp32: changes the approach for configurations of UART interfaces in board definitions
2019-05-09 08:25:40 -07: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
Leandro Lanzieri
9075e1d207
Merge pull request #11290 from gschorcht/cpu/esp32/periph/conf/dac
boards/esp32: changes the approach for configurations of DAC channels in board definitions
2019-05-07 11:35:34 +02:00
990086aee7
Merge pull request #11479 from cladmi/pr/kinetis/hwrng
kinetis: move filtering-out periph_hwrng in cpu/kinetis
2019-05-06 17:42:16 +02:00
Gaëtan Harter
19224ec1d5
kinetis: move filtering-out periph_hwrng in cpu/kinetis
This removes doing `filter-out periph_hwrng, $(FEATURES_PROVIDED)`
after processing `cpu/$(CPU)/Makefile.features`.
The current solution is a HACK as `CPU_MODEL` is currently not available
at that moment but will be in the near future.

It will allow always including `cpu/$(CPU)/Makefile.features` after
`boards/$(BOARD)/Makefile.features`.

It is a part of moving `CPU/CPU_MODEL` definitions to `Makefile.features`.
2019-05-06 15:12:47 +02:00
Gunar Schorcht
3cb08e9e99 cpu/esp32: fixup after rebase 2019-05-06 13:34:59 +02:00
Gunar Schorcht
3e79787bcc cpu/esp32: UART configuration approach changed
UART devices are now configured using static array in header files instead of static variables in implementation to be able to define UART_NUMOF using the size of the array instead of a variable.
2019-05-06 13:34:59 +02:00
Gunar Schorcht
26613ee9e7 cpu/esp32: SPI configuration approach changed
SPI devices are now configured using static array in header files instead of static variables in implementation to be able to define SPI_NUMOF using the size of the array instead of a variable.
2019-05-06 13:33:48 +02:00
Gunar Schorcht
e8828aded8 cpu/esp32: PWM configuration approach changed
PWM channels are now configured using static array in header files instead of static variables in implementation.
2019-05-06 13:32:52 +02:00
Gunar Schorcht
748164ad6a cpu/esp32: I2C configuration approach changed
I2C devices are now configured using static array in header files instead of static variables in implementation to be able to define I2C_NUMOF using the size of the array instead of a variable.
2019-05-06 13:32:06 +02:00
Gunar Schorcht
0510f0c049 cpu/esp32: DAC config approach changed
DAC pins are now configured using static arrays in header files instead of static variables in implementation to be able to define DAC_NUMOF using the size of these arrays instead of a variable.
2019-05-06 13:29:38 +02:00
Gunar Schorcht
32d6c046ac cpu/esp32: ADC config approach changed
ADC pins are now configured using static arrays in header files instead of static variables in implementation to be able to define ADC_NUMOF using the size of these arrays instead of a variable.
2019-05-02 16:38:52 +02:00
Gunar Schorcht
e2abe00fad cpu/esp32: GPIO defs required for periph conf
The GPIO definitions defined here are required in this file to be able to use them in peripheral configurations.
2019-05-02 16:38:24 +02:00
Leandro Lanzieri
7c14ff4153
Merge pull request #11337 from gschorcht/cpu/esp32/periph/submodules
cpu/esp32: fix of periph_* submodule compilation
2019-05-01 23:51:03 +02:00
Gunar Schorcht
94a1af3001 cpu/esp32: additional module dependencies 2019-05-01 09:40:17 +02:00
Gunar Schorcht
6b76e64759 cpu/esp32: periph submodules enabled by default 2019-05-01 09:40:17 +02:00
Gunar Schorcht
4fa1d6bf2c cpu/esp32: dac_* moved to separate DAC submodule 2019-05-01 09:40:17 +02:00
Gunar Schorcht
5f79744aa4 cpu/esp32: rtcio_* moved to new submodule adc_ctrl 2019-05-01 09:40:17 +02:00
Gunar Schorcht
6a652513c1 cpu/esp32: new module for ADC controller functions
Functions that are used by ADC and DAC peripherals are moved to a new submodule periph_adc_ctrl. This is necessary to compile separate submodules for ADC and DAC.
2019-05-01 09:40:17 +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
Gunar Schorcht
09a2a11dd7 cpu/esp: fix computation of coprocessor save area
`top_of_stack` isn't aligned down to the previous 16 byte aligned address. Furthermore, `top_of_stack` as well as `XT_CP_SIZE` are used unaligned in `cpu/esp_common/vendor/xtensa/portasm.S` in the address computation for the coprocessor save area, .

Aligning pointer `p` down to the previous 16 byte aligned address results in a wrong address of the coprocessor save area during the initialization of the thread context. This leads to wrong values and wrong positions of these values in the coprocessor save area in inital thread context.

Since ESP8266 doesn't have a coprocessor, this bug affects only ESP32.
2019-04-27 13:23:04 +02:00
Marian Buschsieweke
20b9ef7c5b
cpu/atmega_common: Fix function attributes
Functions marked with __atribute__((naked)) may only use basic inline assembly
and must not use any c code. The functions __enter_thread_mode() and
cpu_switch_context_exit() are using C code, so they must not be marked as
naked.
2019-04-26 11:02:01 +02:00
Marian Buschsieweke
70cf9b34c7
cpu/atmega_common: Add barriers to irq_*()
To prevent reordering of accesses to the interrupt control register when link
time optimization (LTO) is enabled, memory barriers are needed. Without LTO
calls to the external functions irq_disable(), irq_restore(), irq_enable() and
irq_is_in() have the same affect as compiler barriers, as the compiler is unable
to prove that reordering of memory accesses is safe (from a single-threaded
point of view). With LTO the compiler can easily prove that reordering is safe
from a single-threaded point of view: Thus, the compiler may move memory
accesses wrapped in irq_disable(), irq_restore() across those calls.

The memory barriers will have no effect on non-LTO builds.
2019-04-25 17:42:15 +02:00
Marian Buschsieweke
48fabca38d
cpu/atmega_common: Fix return value of irq_enable
Citing the doc of irq_enable():

    @return Previous value of status register. [...]

On atmega however the new value of the status register is returned, not the one
prior to enabling interrupts.
2019-04-25 17:42:02 +02:00
Gunar Schorcht
0911ddfe07
Merge pull request #11412 from yegorich/pr/esp32/documentation-fixes
esp32: documentation fixes
2019-04-25 17:39:07 +02:00
Marian Buschsieweke
5f355e7210
cpu/arm7_common: Make irq_*() compiler barriers
Previously the compiler was allowed to reorder access to the interrupt control
registers in regard to memory access not marked as `volatile` (at least some
people - most notably some compiler developers - read the C standard this way).
In practise this did not happen as irq_disable(), irq_restore(), irq_enable()
are part of a separate compilation unit: Calls to external functions unknown to
the compiler are treated as if they were memory barriers. But if link time
optimization (LTO) is enabled, this no longer would work: The compiler could
inline the code accessing the interrupt control registers and reorder the memory
accesses wrapped in irq_disable() and irq_restore() outside of their protection.

This commit adds the "memory" clobber to the inline assembly accessing the
interrupt control registers. This makes those accesses explicit compiler memory
barriers. The machine code generated without LTO enabled should not differ in
any way by this commit. But the use of irq_*() should now be safe with LTO.
2019-04-24 16:29:30 +02:00
Vincent Dupont
e9fd193969 cpu/stm32_common: set RTS when uart is off 2019-04-19 17:47:24 +02:00
Yegor Yefremov
9fed14879a cpu/esp32: resolve esptool.py warning
During the flash step esptool.py gives the following warning:

WARNING: Flash size arguments in megabits like '16m' are deprecated.
Please use the equivalent size '2MB'.
Megabit arguments may be removed in a future release.
esptool.py v2.7-dev

This patch replaces '16m' with '2MB' to enable future compatibility.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-04-18 09:56:29 +02:00
Yegor Yefremov
29a3b25379 cpu/esp32: revise CAN support
CAN interface is now supported in RIOT. Change feature table
accordingly.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-04-17 16:59:39 +02:00
Martine Lenders
5e789c6595
Merge pull request #11395 from SemjonKerner/nrfmin_fix_isr
cpu/nrf5x/nrfmin: fix isr termination
2019-04-16 11:27:54 +02:00
Dylan Laduranty
8c708110e5
Merge pull request #11317 from benpicco/sam0-rtc
sam0_common: make RTC implementation common across all sam0 MCUs
2019-04-16 11:03:24 +02:00
Benjamin Valentin
9aa8c619c1 sam0_common: make RTC implementation common across all sam0 MCUs
The currently supported SAM0 MCUs (samd21, saml21, saml1x) share the
same RTC peripheral, yet each of them carries it's own copy of the RTC
driver.

Unify the drivers and move them to sam0_common.
2019-04-15 22:25:47 +02:00
Sebastian Meiling
d08a6132bf
Merge pull request #10934 from gschorcht/cpu_atmega_common_heap
cpu/atmega_common: make remaining RAM available as heap
2019-04-15 13:17:57 +02:00
Semjon Kerner
f8873c31ff cpu/nrf5x/nrfmin: fix isr termination 2019-04-15 13:15:49 +02:00
Gunar Schorcht
de91b8dc88 cpu/esp8266: add LoadStoreError exception handler
Usually, the access to the IROM (flash) memory requires 32-bit word aligned reads. Attempts to access data in the IROM (flash) memory less than 32 bits in size triggers a LoadStoreError exception. With the exception handler from esp-open-rtos it becomes possible to access data in IROM (flash) with a size of less than 32 bits and thus to place .rodata sections in the IROM (flash).
2019-04-15 12:50:44 +02:00
Gunar Schorcht
b17070fbf1 cpu/esp_common: doc fixes 2019-04-15 12:50:44 +02:00
Gunar Schorcht
70ab7501af cpu/esp8266: move xtensa lib to esp_common 2019-04-15 11:46:57 +02:00
Gunar Schorcht
18ebfdf059 cpu/esp32: move xtensa lib to esp_common 2019-04-15 11:45:59 +02:00
Gunar Schorcht
5f1383c27d cpu/esp_common: xtensa vendor files added 2019-04-15 11:45:59 +02:00
Gunar Schorcht
fe3d325fd9 cpu/esp32: remove temporary code 2019-04-15 11:45:59 +02:00
Gunar Schorcht
28d9599d52 cpu/esp32: fix coprocessor stack alignment 2019-04-15 11:45:59 +02:00
Gunar Schorcht
950dfba7de cpu/esp32: SDK_USED replace by MODULE_ESP_SDK 2019-04-15 11:45:59 +02:00
Gunar Schorcht
ec1980a438 cpu/esp32: RIOT_OS macro replaced by RIOT_VERSION 2019-04-15 11:45:59 +02:00
Gunar Schorcht
7cc1ee3f6d cpu/esp32: SDK_INT_HANDLING definition removed 2019-04-15 11:45:59 +02:00
Gunar Schorcht
2ac4d08b43 cpu/esp8266: same xtensa basics as ESP32 2019-04-15 11:45:59 +02:00
Gunar Schorcht
75c0d06913 cpu/esp8266: changes for ESP32 compatibility 2019-04-15 11:45:59 +02:00
Gunar Schorcht
dc7f979201 cpu/esp8266: SDK interrupt handling removed 2019-04-15 11:45:59 +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
db9b341a36
cpu/stm32f1-l0: remove redundant PM_BLOCKER_INITIAL define 2019-04-12 11:10:48 +02:00
10d5554f03
Merge pull request #10944 from gschorcht/cpu/msp430_common_heap_real
cpu/msp430_common: add real malloc/free functions
2019-04-12 10:59:00 +02:00
francisco
2c44cd4f70 stm32_common/flash: move wait_for_pending_operation to flash_common 2019-04-12 08:58:47 +02:00
Gunar Schorcht
dc4565fdfc cpu/esp32: use newlib_syscalls_default by default
Fix of #11354: Function '_write_r' of ESP32's newlibc does not write the output of function 'write(STDIO_FILENO, ...)' to the UART interface. To fix this problem, module 'newlib_syscalls_default' is now used by default. Function '_write_r' of module 'newlib_syscalls_default' uses 'stdio_write' which in turn uses 'uart_write' if module 'stdio_uart' is used which is now the default case for ESP32.
2019-04-11 16:22:47 +02:00
Marian Buschsieweke
ca5e196e78
cpu/atmega_common: Move stdio_init() to cpu_init()
Moving atmega_stdio_init() to cpu_init() just before periph_init() guarantees
that stdio is available to allow DEBUG() in periph_init(). This also helps to
unify the boot up process of ATmega boards and de-duplicates the stdio init from
board_init().
2019-04-10 10:18:43 +02:00
38cc72d0e0
Merge pull request #11046 from kaspar030/reset_fe310_timer
cpu/fe310: periph/timer: reset counter in timer_init()
2019-04-09 15:50:19 +02:00
MrKevinWeiss
4c9890b269 cpu/cc26x0/i2c: Rework and add error handling
This commit cleans up magic number and defines bitfields.
Adds error codes for ADDR/DATA NACK and ARBLOSS
Adds error handling, it corrects when an error occurs
Protects from flags that could lockup the bus
2019-04-08 11:32:12 +02:00
07eb8554f8 cpu: cc26x0: add periph/i2c implementation 2019-04-08 08:52:43 +02:00
7b6d8d65ff cpu/cc26x0: add missing PERIPH_BASE define 2019-04-08 08:52:43 +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
Gunar Schorcht
3bad3e6199 cpu/esp32: use periph.mk in perpih Makefile
Includes now $(RIOTMAKE)/periph.mk instead of $(RIOTBASE)/Makefile.include to control compilation of periph submodules.
2019-04-04 00:48:33 +02:00
Hyungsin
d9c17c2154 boards: add initial hamilton board support 2019-04-03 15:00:35 -07: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
Gunar Schorcht
419cedf58e cpu/msp430_common: add real malloc/free functions
For this purpose, adapted AVR libc functions are used. When used, malloc and free functions require 304 additional bytes of code compared to the oneway_malloc module.
2019-04-03 09:21:03 +02:00
Martine Lenders
05d0c6c5b7
Merge pull request #11187 from gschorcht/cpu/esp_common/esp_now/iol_len
cpu/esp_common: esp_now doesn't call memcpy if iol_len is 0
2019-04-02 19:08:23 +02:00
Martine Lenders
af65d2da59
Merge pull request #11184 from gschorcht/cpu/esp32/esp_wifi/iol_len
cpu/esp32: esp_wifi doesn't call memcpy if iol_len is 0
2019-04-02 19:08:15 +02:00
Martine Lenders
2d906de873
Merge pull request #11186 from gschorcht/cpu/esp32/esp_eth/iol_len
cpu/esp32: esp_eth doesn't call memcpy if iol_len is 0
2019-04-02 17:51:26 +02:00
Vincent Dupont
38b9ed1cac cpu/stm32_common: fix month encoding in RTC driver 2019-04-01 16:50:56 +02:00
Gunar Schorcht
9cc39133e4 cpu/esp_common: check iol_base in esp_now before using it 2019-03-30 15:10:34 +01:00
Sebastian Meiling
e9072b1e28
Merge pull request #10981 from gschorcht/cpu/esp8266/rodata_IROM/pr
cpu/esp8266: most .rodata sections are moved from DRAM to IROM (flash)
2019-03-29 20:18:06 +01: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
01b11ab86e
Merge pull request #11297 from OTAkeys/pr/stm32_rtt_reg_fix
cpu/stm32_common: fix rtt registers access
2019-03-29 09:32:04 +01:00
Kevin "Bear Puncher" Weiss
2d7c72db7f
Merge pull request #11231 from gschorcht/cpu/esp32/periph/uart_mode
cpu/esp32: add the new API function uart_mode to periph/uart
2019-03-28 19:29:38 +01:00
Gunar Schorcht
217ccbe1c4 cpu/esp32: add new uart_mode API function
The internal _uart_set_mode function is exposed if module periph_uart_modecfg is enabled.
2019-03-28 16:36:04 +01:00
Gunar Schorcht
ec013f74a7 cpu/esp32: add internal _uart_set_mode function
Configuration of UART mode is realized by an internal function which is also used by UART initialization function.
2019-03-28 16:36:04 +01:00
Gunar Schorcht
b9a8b98a9b cpu/esp32: add config member values for uart_mode
Set default values for additional data members of UART device configuration data structure that are needed by uart_mode API function.
2019-03-28 16:36:04 +01:00
Gunar Schorcht
6132c08a90 cpu/esp32: add config members for uart_mode
Add data members to the UART device configuration data structure that are needed by uart_mode API function.
2019-03-28 16:36:04 +01:00
Kevin "Bear Puncher" Weiss
15c2a48fdf
Merge pull request #10839 from dylad/pr/sam0/remove_gclk_slow
cpu/sam0_common: remove unneeded GCLK_SLOW setup in i2c driver
2019-03-28 14:31:16 +01:00
Dylan Laduranty
ccf12c57a8
Merge pull request #10884 from fedepell/sam_rwee_support
sam0 flashpage RWWEE flash support
2019-03-28 11:00:25 +01:00
Vincent Dupont
749b291273 cpu/stm32_common: fix rtt registers access 2019-03-27 16:43:00 +01:00
JulianHolzwarth
e1d4551459 cpu/esp32/freertos/semphr.c::xSemaphoreTakeRecursive() return value fix
xSemaphoreTakeRecursive() returned before the fix: pdFALSE(equal to pdFAIL) when the call was successful in obtaining the semaphore
and pdTRUE(equal to pdPASS) when the call did not successfully obtain the semaphore.
According to freertos documentation:
"pdPASS Returned only if the call to xSemaphoreTakeRecursive() was successful in obtaining the semaphore"
"pdFAIL Returned if the call to xSemaphoreTakeRecursive() did not successfully obtain the semaphore."
Fixed it to return the correct value.
2019-03-27 15:54:30 +01:00
JulianHolzwarth
1b42d3ff86 cpu/esp32/freertos/semphr.c::xSemaphoreTake() return value fix
xSemaphoreTake() returned before the fix: pdFALSE(equal to pdFAIL) when the call was successful in obtaining the semaphore
and pdTRUE(equal to pdPASS) when the call did not successfully obtain the semaphore.
According to freertos documentation:
"pdPASS Returned only if the call to xSemaphoreTake() was successful in obtaining the semaphore"
"pdFAIL Returned if the call to xSemaphoreTake() did not successfully obtain the semaphore."
Fixed it to return the correct value.
2019-03-27 15:54:30 +01:00
Kevin "Bear Puncher" Weiss
f7ff74f30d
Merge pull request #11279 from fjmolinas/stm32_common_i2c_DEVELHELP
stm32_common/i2c_2: fix unused *i2c when no DEVELHELP
2019-03-27 11:42:48 +01:00
francisco
1a583844b8 stm32_common/i2c_2: fix unused *i2c when no DEVELHELP 2019-03-27 11:28:54 +01:00
Michel Rottleuthner
4b9866b289 cpu/stm32f103: add workaround to make gpio B4 usable as output pin
->> by default the pin B4 is used as SWJRST. This remaps the pin when it is initialized with gpio_init.
currently its only enabled for stm32f104rb
2019-03-26 21:43:35 +01:00
Kevin "Bear Puncher" Weiss
14d17b6ec1
Merge pull request #11276 from gschorcht/cpu/esp32/periph/uart/cleanup
cpu/esp32: periph uart cleanups
2019-03-26 18:48:43 +01:00
Gunar Schorcht
c0f50104b9 cpu/esp32: GPIO init order for UART RX/TX changed
The GPIO for RX has to be initialized as input before the GPIO for TX can be initialized as output. Otherwise it could lead to creash if RX GPIO was used as output before.
2019-03-26 16:16:49 +01:00
1286b18ca9
sam0_common: Fix syntax mistake in usbdev driver 2019-03-26 16:09:03 +01:00
emmanuelsearch
61c793aa4c cpu/cortexm_common: Add image_baseaddr support for Cortex-M23 2019-03-26 11:46:00 +01:00
d7804823db
sam0_common: Add USB peripheral driver 2019-03-26 10:26:11 +01:00
Gunar Schorcht
b42106e738 cpu/esp32: required uart_set_baudrate changes
Function uart_set_baudrate which is only used internally was made static and renamed to _uart_set_baudrate to indicate that it is an internal function. Furthermore, an additional waiting for flushed TX FIFO added. The reconfiguration is now handled as critical section.
2019-03-26 09:57:44 +01:00
Gunar Schorcht
f5da4a1c9f cpu/esp32: internal uart int handler made static
The interrupt handler is only used internally and declared to be static.
2019-03-26 09:57:44 +01:00
Gunar Schorcht
9378888be6 cpu/esp32: some uart_* funcs moved inside the file
For consistency reasons, external functions were moved to the section of external functions.
2019-03-26 09:57:44 +01:00
Gunar Schorcht
de64d2e384 cpu/esp32: _uart_config function moved
For consistency reasons, internal function _uart_config was moved to the section of internal functions.
2019-03-26 09:57:44 +01:00
Gunar Schorcht
ec44ee7fb8 cpu/esp32: additional _ removed from __uart_*
An additional _ for static symbols has been added by mistake and should be removed. This will make future merging with the reimplementation of ESP8266 easier.
2019-03-26 08:14:00 +01:00
Gunar Schorcht
01d17793eb boards/cpu/esp32*: doc fix of built-in ROM size 2019-03-25 14:00:59 +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
Semjon Kerner
253cf0f9fc
Merge pull request #11176 from bergzand/pr/nrf802154/undef_memcpy
nrf802154: don't call memcpy if iolist->iol_len==0
2019-03-25 08:09:59 +01:00
Emmanuel Baccelli
1859d03a5a
Merge pull request #11249 from dylad/pr/saml1x_waitstate
cpu/saml1x: set wait state according to datasheet
2019-03-24 23:40:51 +01:00
1f937cedb7
Merge pull request #11141 from fjmolinas/stm32l0_bootloader
stm32l0: add riotboot support
2019-03-24 10:48:48 +01:00
dylad
82aa6c0280 cpu/saml1x: set wait state according to datasheet 2019-03-24 10:43:40 +01:00
10b783d82c
Merge pull request #11211 from aabadie/cpu_stm32f3_cpu
cpu/stm32: add STOP and STANDBY low-power for stm32f3, unify for all stm32
2019-03-23 20:59:22 +01:00
e089b1eb02
cpu/kinetis: define ROM_LEN with a non arithmetic value
It must be evaluated in `cortexm_common` without a shell context.
The `K` is correctly handled by both the linker and `cortexm_common`.

Co-authored-by: Gaëtan Harter <gaetan.harter@fu-berlin.de>
2019-03-23 12:14:21 +01:00
b4bb144006
nrf802154: don't call memcpy if iolist->iol_len==0 2019-03-22 19:00:53 +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
3fc8a13ddd
cpu/stm32f7: use pm_layered module 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
d5c1d2fdc4
cpu/stm32l4: use pm_layered module 2019-03-21 19:39:15 +01:00
679fee7f9c
cpu/stm32_common: implement low-power modes for L4 2019-03-21 19:39:15 +01:00
Marian Buschsieweke
9a2f69b79c
cpu/msp430_common: Cleanup
`void cpu_switch_context_exit(void)` assigns `sched_active_thread` just before
calling `sched_run()`. This is unneeded, as `sched_run()` will updated that
anyway. Also generally speaking, changing internal scheduler data from outside
the scheduler is a risky thing to do.
2019-03-21 16:53:53 +01:00
Marian Buschsieweke
569427b741
cpu/msp430fxyz: Add missing #include 2019-03-21 16:49:03 +01:00
francisco
57d0787311 cpu/stm32l0: define CPU_FLASH_BASE 2019-03-21 15:07:08 +01:00
Juan I Carrano
c391ed4109
Merge pull request #10943 from gschorcht/cpu/mps430_common_heap
cpu/msp430_common: set top of heap for sbrk
2019-03-21 11:44:35 +01:00
Federico Pellegrin
5faafac092 sam0 flashpage RWWEE flash support 2019-03-21 04:27:41 +01:00
Martine Lenders
4ee4625f39
Merge pull request #10357 from jcarrano/posix_headers-module
sys/posix: make posix module provide only headers.
2019-03-20 14:07:12 +01:00
Juan Carrano
6b766c3cd3 sys/posix: make posix module provide only headers.
The build system contains several instances of
 INCLUDES += -I$(RIOTBASE)/sys/posix/include

This is bypassing the module management system, by directly accesing
headers without depending on a module. The module is the posix module.

That line is also added when one of the posix_* modules is requested.

According to the docs, the posix module provides headers only, but in
reality there is also inet.c.

This patch:

- Moves `inet.c` into `posix_inet`, leaving `posix` as a headers-only
  module.
- Rename `posix` as `posix_headers` to make it clear the module only
  includes headers.
- Makes `posix_*` modules depend on `posix_headers`, thus removing the
  explicit `INCLUDES+=...` in `sys/Makefile.include`.
- Ocurrences of `INCLUDES+=...` are replaced by an explicit dependency
  on `posix_headers`.
2019-03-20 12:57:13 +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
Kevin "Bear Puncher" Weiss
005275a1e9
Merge pull request #11205 from yegorich/pr/uart/stm32/fix-data-bits
cpu/stm32_common: use correct data bits macro
2019-03-19 10:17:56 +01:00
ca5b5a6d0f
samd21: Expose numerical PM states 2019-03-18 13:44:26 +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
658fb0651e
nrf802154: Disable hardware IFS handling 2019-03-15 13:39:09 +01:00
de2f193da3
nrf802154: Fix timer behaviour of the IFS timer
The timer_clear function doesn't clear the hardware timer counter, but
is designed to clear the allocation of the channel. The consequence is
that the IFS timer here is not set to zero in the callback, but only
stopped at the current value. When the timer is started again, it has to
count the full timer range until it matches the timeout value again.

This commit fixes this issue by using timer_set instead of
timer_set_absolute. This way the current timer value (when the timer is
stopped) is read and the IFS timeout value is added to the current timer
value.
2019-03-15 13:39:09 +01:00
8c4760050e
nrf802154: Change timer frequency to match symbols rate
ieee802.15.4 specifies 40 symbols as LIFS value and 12 symbols as SIFS
value. Furthermore, the 2.4Ghz DSSS mode has a symbol rate of
62.5Ksymbols/s. To have the LIFS and SIFS in the code match the timings
from the specification, the TIMER_FREQ must match the symbol rate of
62.5Ksymbol/s such that one tick of the timer equals one symbol in time.
2019-03-15 13:38:32 +01:00
Semjon Kerner
6c84b4126f
Merge pull request #11138 from bergzand/pr/nrf802154/fix_fcs_lifs
nrf802154: take FCS into account for lifs/sifs calculation
2019-03-15 13:10:39 +01:00
Martine Lenders
eff3b5ec28 nrf52/radio: remove redundant message queue definition
Now that `GNRC_NETIF_MSG_QUEUE_SIZE` is set to 16 by default, this
command-line provided define is redundant.
2019-03-15 12:09:39 +01:00
Semjon Kerner
6d3b625f3f
Merge pull request #11133 from bergzand/pr/nrf802154/radio_info
nrf802154: Add rssi/lqi to received frames
2019-03-15 11:46:17 +01:00
Gunar Schorcht
5a782fe3b5 cpu/esp_common: esp_now doesn't call memcpy if iol_len is 0 2019-03-14 17:08:18 +01:00
Gunar Schorcht
06c59784b5 cpu/esp32: esp_eth doesn't call memcpy if iol_len is 0 2019-03-14 16:57:26 +01:00
Gunar Schorcht
ad57337c4e cpu/esp32: esp_wifi doesn't call memcpy if iol_len is 0 2019-03-14 16:11:24 +01:00
Francisco Acosta
de720730f6
Merge pull request #11127 from bergzand/pr/nrf52/ref_ldscripts
nrf52: use cortexm.ld script when applicable
2019-03-13 19:41:13 +01:00
Juan I Carrano
4af354852b
Merge pull request #11170 from haukepetersen/fix_nrf52840_dmafromrom
cpu/nrf52840: fix UART DMA when data is in ROM
2019-03-13 14:30:20 +01:00
Gunar Schorcht
55f433103b cpu/msp430_common: set top of heap for sbrk
Set __heap_end to current SP before entering thread mode to make the remaining RAM available as heap for module oneway_malloc.
2019-03-13 13:30:56 +01:00
Hauke Petersen
91057de140 cpu/nrf52840: fix UART DMA when data is in ROM 2019-03-13 13:05:36 +01:00
3163b8d6e2
nrf52: use cortexm.ld script when applicable
The common linker script is not used when the nordic_softdevice_ble is
included
2019-03-13 11:57:44 +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
b650f355c7
nrf802154: Add rssi/lqi to received frames
LQI calculation following the instructions from the datasheet. RSSI
calculation appears to only require the offset and not the scaling
factor
2019-03-12 15:11:13 +01:00
Juan I Carrano
b50ad9ed4c
Merge pull request #11040 from kaspar030/fix_hifive1_reset
boards/hifive1: fix hifive1 reset
2019-03-12 14:59:36 +01:00
847dc3d55c cpu/fe310: implement pm_reset() using watchdog 2019-03-12 11:49:02 +01:00
Gilles DOFFE
90f819eee2 cpu/native: return 0 if GPIO is an output in gpio_init
If the GPIO is in an output state, gpio_init() can return 0 without bad
consequences.
-1 was return until now.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2019-03-11 01:44:22 +01:00
Gilles DOFFE
dc8a44ce14 cpu/native: correct emails in header
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2019-03-11 01:44:22 +01:00
Gilles DOFFE
1da6a03f09 cpu/native: add pwm implementation
Simulate PWM signals with a 2 dimensions array.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2019-03-11 01:44:22 +01:00
a142286d8d
cpu/nrf5x_common: add temperature periph driver 2019-03-08 21:14:21 +01:00
14a5e4924b
nrf802154: take FCS into account for lifs/sifs calculation 2019-03-07 20:26:39 +01:00
Sebastian Meiling
b98fdac01e
Merge pull request #9917 from gschorcht/esp8266
cpu/esp8266: esp-now network device support
2019-03-06 20:28:39 +01:00
7b9181ea6f
Merge pull request #11072 from benpicco/samd21_pm
samd21: enable idle modes
2019-03-06 13:55:08 +01:00