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

4374 Commits

Author SHA1 Message Date
51e40084c1
Merge pull request #11832 from fjmolinas/pr_optimize_pm_stm32l1
cpu/stm32l1: optimize power consumption
2019-08-06 09:34:07 +02:00
Gunar Schorcht
7f30bf2aef cpu/esp32: optimizing compilation of subdirs
A number of subdirectories in cpu/esp32/vendor/esp-idf have to be compiled ony, when according modules are required by the application.
2019-08-06 08:05:28 +02:00
Gunar Schorcht
9e47872a59 cpu/esp32: fix multiple definition of putchar
When standard C libraries are added to BASELIBS to group them together with all other modules, there are multiple definitions for the putchar function. The one that is defined writing to the UART as standard output and the one that is provided by the standard C libraries. To solve this symbol conflict, putchar and getchar functions that use the UART as standard output/input are renamed to __wrap_putchar and __wrap_getchar and the linker options are extended by -Wl,-wrap option.
2019-08-06 08:05:22 +02:00
Gunar Schorcht
4972d5bd67 cpu/esp32: fix pthread_setcancelstate symbol problem
When linking an application, symbol pthread_setcancelstate is not known in standard C libraries, even if the pthread module is linked. This is because the pthread module is grouped with all other modules, but not with the default C libraries when they are added to LINK_FLAGS. Therefore, standard C libraries have to be added also to BASELIBS to group them with all other modules.
2019-08-06 08:05:18 +02:00
Gunar Schorcht
e9ecca2c62 cpu/esp32: fix unknown symbols for unused functions
Fixes the problem that the compilation of an applications can throw unknown symbol errors for functions that aren't use at all. Thus, it is possible to remove the warning for unknown symbols and the compilation can abort if there are real unknown symbols.
2019-08-06 08:04:57 +02:00
MichelRottleuthner
a55e1fcb15
Merge pull request #11964 from gschorcht/cpu/esp32/esp_wifi/fix_send_return_value
cpu/esp32: fix of the return code in esp_wifi_send
2019-08-05 18:50:52 +02:00
fjmolinas
254934dfa6 cpu/nrf5x_common: add flashpage_raw_support 2019-08-05 17:45:14 +02:00
Gunar Schorcht
b571757bcd cpu/esp32: fix of the return code in esp_wifi_send 2019-08-05 17:38:03 +02:00
fjmolinas
e1576c986c cpu/efm32: add flashpage_raw 2019-08-05 17:24:26 +02:00
570f308551
cpu/efm32: deduplicate cpu_efm32 group definition 2019-08-05 16:57:36 +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
0adb36e5ef stm32l1/vendor: add v2.3.0 vendor files 2019-08-05 11:13:08 +02:00
Francisco Molina
d075e55bb4 cpu/cortexm_common: replace irq_restore by __set_PRIMASK for stm32l152re
- The __NOP() that was added in #8518 is now remooved.
- When DBG_STANDBY, DBG_STOP or DBG_SLEEP are set in DBG_CR a hardfault
  occurs on wakeup from sleep. This was first diagnosed in #8518. When
  enabled, a hardfault occured when returning from a branch to irq_restore()
  we avoid the call by inlining the function call. See #11830 for more
  details.
2019-08-05 10:40:28 +02:00
Benjamin Valentin
7e5088982b cpu: saml21: don't silently ignore missing makefile
-include will throw no error if sam0_common/Makefile.features does not exist.
This may not have been intentional as none of the other sam0 implementations
do this.

Replace it with a normal include.
2019-08-03 14:50:58 +02:00
Benjamin Valentin
a9b0db3ba4 cpu/sam0_common: add hwrng driver 2019-08-03 14:50:58 +02:00
Marian Buschsieweke
e612d3d71b
Merge pull request #11122 from ibr-cm/hartung/atmega-pin-change-interrupt-pseudomodules
cpu/atmega_common: pseudomodule-based pin change interrupt implementation
2019-08-02 13:41:37 +02:00
Robert Hartung
c8d460eefe cpu/atmega256rfr2: pin change interrupts 2019-08-01 09:35:35 +02:00
Robert Hartung
57705d4386 cpu/atmega2560: pin change interrupts 2019-08-01 09:35:35 +02:00
Robert Hartung
eeb895fd4e cpu/atmega1284p: pin change interrupts 2019-08-01 09:35:35 +02:00
Robert Hartung
dcd9177271 cpu/atmega32u4: pin change interrupts 2019-08-01 09:23:58 +02:00
Robert Hartung
0fc55cdaf9 cpu/atmega1281: pin change interrupts 2019-08-01 09:23:43 +02:00
Robert Hartung
7bca1cc5d5 cpu/atmega_common: implements pseudomodule-based pin change interrupts 2019-08-01 09:23:04 +02:00
Gunar Schorcht
97bb33788b cpu/esp*: changes to use esp_wifi and esp_now 2019-07-31 13:53:48 +02:00
Gunar Schorcht
760168e403 cpu/esp_common: doc fixes 2019-07-31 13:53:48 +02:00
Gunar Schorcht
96a9949bf9 cpu/esp32: set WiFi config storage type 2019-07-31 13:53:48 +02:00
Gunar Schorcht
9981d2b05c cpu/esp32: cleanup comments/messages in esp_wifi 2019-07-31 13:53:48 +02:00
Gunar Schorcht
636c0847be cpu/esp_common: set WiFi config storage type 2019-07-31 13:53:48 +02:00
Gunar Schorcht
8f0f8f5993 cpu/esp_common: add/fix comments and messages 2019-07-31 13:53:48 +02:00
Gunar Schorcht
9db62bd401 cpu/esp_common: cleanup of compile time config 2019-07-31 13:53:48 +02:00
Gunar Schorcht
f34a1a3eef cpu/esp*: shorter netdev task names 2019-07-31 13:53:48 +02:00
Gunar Schorcht
1492f00690 cpu/esp32: esp_wifi compile configuration tuned
Downsized numbers of dynamic send and receive buffers.
2019-07-31 13:53:48 +02:00
Gunar Schorcht
dd6a5cde5c
Merge pull request #11239 from JulianHolzwarth/esp32/freertos/fix/semaphoreTake
cpu/esp32/freertos: fix semaphore take
2019-07-31 11:01:41 +02:00
Leandro Lanzieri
699fbc998a
Merge pull request #11922 from gschorcht/cpu/esp32/cpp
cpu/esp32: activate cpp feature
2019-07-30 21:04:04 +02:00
MichelRottleuthner
bd576e7839
Merge pull request #11896 from fjmolinas/pr_stm32l4_stmclk_hsemsi
cpu/stm32l4/stmclk: fix HSE overwrite when MSI is enabled
2019-07-30 18:46:17 +02:00
Gunar Schorcht
7962a0c179 cpu/esp32: activate cpp feature
Adds module pthread and the libstdc++ to linked libraries to solve the problem with unresolved symbols when feature cpp is required.
2019-07-29 16:06:04 +02:00
Marian Buschsieweke
f9f30ed15b
cpu/atmega32u4: Removed incorrect interrupt
Currently the configuration claims that external interrupt INT4 is present on
pin PE7. However, the ATmega32U4 datasheet (section 10.3.4 page 81) contains
the following remark to pin PE7: "Not present on pin-out". This commit removes
the PE7 from the interrupt config.
2019-07-26 17:22:55 +02:00
Marian Buschsieweke
fd559bcdb5
cpu/arm7_common: Cleaned up IRQ code
- Moved VIC.c to irq_arch.c for consistent naming scheme
- Removed unused functions IRQenabled, disableFIQ, restoreFIQ, enableFIQ
    - There is not header for those functions, so they *cannot* be used
    - These is obviously no user, as they *cannot* be used
    - There is absolutely no documentation what they would be used for
2019-07-25 10:31:41 +02:00
Francisco Molina
c166b73e61 cpu/stm32_common: uniformize define alignments 2019-07-24 09:02:47 +02:00
Francisco Molina
51bc33de97 cpu/stm32l4/stmclk: fix HSE overwride when MSI is enabled 2019-07-23 17:26:26 +02:00
Francisco Molina
128e6ed2c9 stm32_common/gpio: remove unused guard 2019-07-23 17:05:37 +02:00
Juan I Carrano
7dd00b79e9
Merge pull request #11846 from jcarrano/mips32r2_generic-is-gone
cpu/mips32r2_generic: remove cpu.
2019-07-22 11:35:24 +02:00
3bcc72b614
Merge pull request #11878 from kaspar030/esp32_has_timer_set
esp32: define PERIPH_TIMER_PROVIDES_SET
2019-07-21 21:16:49 +02:00
3da6593a54 esp32: define PERIPH_TIMER_PROVIDES_SET 2019-07-19 22:28:27 +02:00
kenrabold
97d1dc0821 cpu/fe310: Add support for FE310_G002
Added support for FE310_G002 CPU variant that is on new HiFive1B board
2019-07-19 13:25:17 -07:00
Benjamin Valentin
56891fe7f2 cpu/sam0: update doc.txt with new MCU families 2019-07-17 11:37:46 +02:00
Juan Carrano
a2bcd7539c cpu/mips32r2_generic: remove cpu.
The `mips32r2_generic` CPU was only used by the `mips-malta` board which has
been removed. The reasons for this removal are the same as for the board:

- No hardware to test.
- The board that used this CPU is not available off the shelf.
- No UART input.
- No integrated flasher (one needs to use a separate Windows tool)

For more information and discussion around MIPS, see issues:

- #11831 (Removal of mips-malta)
- #11788 (General MIPS removal)
2019-07-16 11:09:48 +02:00
francisco
38ffe80a96 cpu/stm32l151cb_a: include _A suffix in CPU_MODEL defines 2019-07-09 08:56: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
Kevin "Bear Puncher" Weiss
f976aeb1af
Merge pull request #11720 from benemorius/efm32-gpio-init-int-disable
cpu/efm32/periph_gpio: fix wrong GPIO_IntDisable() in gpio_init_int()
2019-07-08 15:36:38 +02:00
7340de6129
cpu/stm32l4: add support for stm32l4r5zi model 2019-07-08 09:09:47 +02:00
3881128884
cpu/stm32_common: extend memory lengths support 2019-07-08 09:09:46 +02:00
33a878b70c
cpu/smt32l4: fix quadspi IRQ in vectors table 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
Victor Arino
e206087d65
stm32_eth: Initial implementation by Victor Arino
drivers/eth-phy: add generic Ethernet PHY iface
cpu/stm32f4: implement eth driver peripheral

This implements the ethernet (MAC) peripheral of the stm32f4 as a
netdev driver.
boards/stm32f4discovery: add eth configuration
boards/stm32f4discovery: add feature stm32_eth
tests/stm32_eth_lwip: add test application
2019-07-04 15:04:01 +02:00
Hauke Petersen
1744b6bd92
Merge pull request #11559 from PeterKietzmann/pr_nrf5x_hwrng_softdev
cpu/nrf5x_common: map hwrng to SoC library if SoftDevice is present
2019-07-04 14:23:55 +02:00
PeterKietzmann
7ee9905fa6 cpu/nrf5x_common: map hwrng to SoC library if SoftDevice is present 2019-07-04 12:12:28 +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
Francisco
bc6303fb59
Merge pull request #11750 from aabadie/pr/cpu/stm32l1-4_flashpage_numof
cpu/stm32l{1,4}: refactor flashpage numof macros
2019-07-01 14:58:10 +02:00
3b58b4b6b6
cpu/stm32f3: add support for flashpage 2019-06-28 17:16:10 +02:00
ea441bab5e
Merge pull request #11713 from bergzand/pr/nrf5x/uart_modecfg
nrf5x: Add UART modecfg feature implementation
2019-06-28 13:56:44 +02:00
Leandro Lanzieri
56ffb45f6c
Merge pull request #11719 from benemorius/efm32-numof_irqs-off-by-one
cpu/efm32/periph_gpio: fix NUMOF_IRQS off-by-one error
2019-06-28 11:25:04 +02:00
81df812c5b
nrf5x: Add UART modecfg feature implementation 2019-06-28 09:56:40 +02:00
Kevin "Bear Puncher" Weiss
135ad3817b
Merge pull request #10982 from gschorcht/cpu/esp8266/periph/pwm/pr
cpu/esp8266: fix pwm_set func
2019-06-27 16:35:53 +02:00
Gunar Schorcht
d3e0b78f7c cpu/esp8266: fix of set func in periph/pwm
In the `pwm_set` function, the switch-on and switch-off times for PWM channels were only determined for the following phase, but not for the current phase. This could result in a missing duty cycle when calling the function `pwm_set` if the switch-on time of the current phase was not yet reached or to an extended duty cycle if the switch-off time of the current phase had not yet been reached.
2019-06-26 16:00:02 +02:00
ee5181dd50
cpu/stm32l4: use flash size define to get the number of pages 2019-06-26 08:46:19 +02:00
cef14009d9
cpu/stm32l1: use flash size define to get the number of pages 2019-06-26 08:46:08 +02:00
56085b10a0
Merge pull request #11698 from bergzand/pr/usb/nrfusb_suspend
nrf52: Add suspend/resume detection to usbdev
2019-06-25 16:12:27 +02:00
ee39222b2e
nrf52: Add suspend/resume detection to usbdev 2019-06-25 15:39:52 +02:00
Sebastian Meiling
7fa201ef24
Merge pull request #11729 from MrKevinWeiss/pr/kinetis/i2c/errorcodefix
cpu/kinetis/i2c: Fix false positive for expected EIO during i2c write
2019-06-21 13:18:26 +02:00
Kevin "Bear Puncher" Weiss
a290f2d66c
Merge pull request #11712 from bergzand/pr/sam0_common/uart_modecfg
sam0_common: add uart modecfg support
2019-06-21 13:08:07 +02:00
MrKevinWeiss
ec62f1ccce cpu/kinetis/i2c: Suppress cppcheck unreadVariable warning
On cppcheck 1.82 it throws a warning.
Since it costs cycles and does nothing the ++dummy is (void)dummy.
A warning suppression is added so the CI is happy.
2019-06-21 12:29:14 +02:00
Sebastian Meiling
44d09f3ca0
Merge pull request #11728 from MrKevinWeiss/pr/stm/i2c2/fix
cpu/stm32/i2c: Fix error flag clearing in sr1
2019-06-21 11:43:09 +02:00
3241aff71c
sam0_common: add uart modecfg 2019-06-21 10:54:24 +02:00
Benjamin Valentin
99344e8030 cpu/samd5x: make sure RIOTBOOT_LEN is 2*FLASHPAGE_SIZE
The flashpage size on samd5x is 8k, so set RIOTBOOT_LEN accordingly.
2019-06-21 09:47:04 +02:00
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