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

259 Commits

Author SHA1 Message Date
Leandro Lanzieri
4d65bc8e0a
cpu: Rename CPU_ARCH to CPU_CORE 2020-06-16 12:05:40 +02:00
Matthew Bradbury
ba51e90228 cpu/cc2538: Flush the RX FIFO (if overflowed) after a receive 2020-04-20 18:19:23 +01:00
Matthew Bradbury
bcfb437746 cpu/cc2538: Do not check XREG_RSSISTATbits for RSSI_VALID 2020-04-20 18:18:56 +01:00
Matthew Bradbury
ecfe4a4e8f cpu/cc2538: Check CRC of received message after reading message contents 2020-04-20 18:18:56 +01:00
Matthew Bradbury
fc0581056a cpu/cc2538: Check for a minimum length to read from a received frame 2020-04-20 18:18:56 +01:00
Matthew Bradbury
f0e48f0741 cpu/cc2538: Prevent underflow of the RX FIFO 2020-04-20 18:18:53 +01:00
Jose Alamos
77325b4cde ieee802154: add CONFIG_ prefix to config macros 2020-04-08 19:08:25 +02:00
Leandro Lanzieri
64552a3b9a
cpu/cortexm_common: Move common modules to Makefile.dep
This moves the following modules to a architecture-specific Makefile.dep
file:
- cortexm_common
- cortexm_common_periph
- newlib
- newlib_nano
- periph
2020-04-01 09:46:21 +02:00
Francisco Molina
dcd6b7f226
cpu/cc2538/timer: fix GPT enabling wait 2020-03-25 20:16:23 +01:00
benpicco
e9b71254ff
Merge pull request #13694 from fjmolinas/pr_boards_common_cc2538
boards: add common cc2538
2020-03-25 11:11:50 +01:00
Francisco Molina
194af687a0
boards/common: add cc2538 2020-03-25 08:20:52 +01:00
benpicco
457c5245ce
Merge pull request #13507 from benpicco/cpu/cc2538-gpio-cycles
cpu/cc2538: gpio: save a few cycles in handle_isr()
2020-03-23 20:53:52 +01:00
Francisco Molina
0cc6a51ea8
cpu/cc2538/periph/timer: cleanup styling 2020-03-23 10:59:53 +01:00
Francisco Molina
7e913fe0d9
cpu/cc2538/periph/timer: set pending timer_set_absolute
GPT timer needs to be gated to write to TnMATCHR register. If set
when timer is stopped save values and set on next timer_start()
2020-03-23 10:59:30 +01:00
Francisco Molina
ce696c6caa
cpu/cc2538/timer: enable GPT clock in active, sleep and PM0 2020-03-23 10:58:56 +01:00
Benjamin Valentin
345827ce7b cpu/cc2538: gpio: save a few cycles in handle_isr()
If only one it is set in state (one GPIO pin caused an interrupt),
don't loop over all 8 bits.

Use clz to get the position of the first interrupt bit and clear it,
looping only as many times as there are actual interrupts.
2020-03-23 09:21:14 +01:00
Francisco Molina
9a2190cd24
cpu/cc2538/periph/pm: unset OSC_PD when running on 32Mhz
Setting OSC_PD before WFI allows for faster wakeup from sleep.

Wait for cc2538_sys_ctrl_clk_sta and not cc2538_sys_ctrl_clk_ctrl
to be set.
2020-03-21 19:32:24 +01:00
Francisco Molina
8c35335668
cpu/cc2538/cpu: cleanup clock intialization 2020-03-21 19:32:22 +01:00
Francisco
b98e4bf0d1
Merge pull request #13658 from fjmolinas/pr_periph_timer_cc2538
cpu/cc2538: fix GPT3 IRQ definition
2020-03-20 14:31:05 +01:00
Gunar Schorcht
df19c6d1b4
Merge pull request #13519 from benpicco/rtt_rtc
drivers/rtt_rtc: add RTT based RTC implementation, enable it for cpu/cc2538, nrf5x_common
2020-03-19 17:18:43 +01:00
Francisco Molina
226e1b5daf
cpu/cc2538: fix GPT3 timer IRQ definition 2020-03-19 16:31:57 +01:00
Benjamin Valentin
f9346e1e2b cpu/cc2538: use RTT based RTC implementation 2020-03-19 15:25:14 +01:00
Francisco
d77ecc1cde
Merge pull request #13598 from benpicco/cpu/cc2538-spi-fix
cpu/cc2538: fix spi_transfer_bytes()
2020-03-17 17:29:49 +01:00
benpicco
5d038a24bf
Merge pull request #13510 from benpicco/cpu/cc2538-pm
cpu/cc2538: implement periph/pm
2020-03-12 12:18:18 +01:00
Dylan Laduranty
077a15f254 cpu/cc2538: use generic hw fc module 2020-03-10 14:22:34 +01:00
Benjamin Valentin
5d8c00e302 cpu/cc2538: implement periph/pm
cc2538 implements 4 sleep modes.
In the lightest mode (3) any interrupt source can wake up the CPU.
In mode 2, only RTT, GPIO or USB may wake the CPU.
In mode 1 only RTT and GPIO can wake the CPU.
In mode 0 only GPIO can wake the CPU.

In mode 0 and 1 the lower 16k RAM are lost. This is a problem since those
are usually used by RIOT.

The linkerscripts in cc2538/ldscripts take different approaches towards that.
Some only use the upper 16k and leave the other half to be managed by the
application.

`cc2538sf53.ld` which is used by `openmote-b` uses the entire RAM starting
at the lower half, so it will not be able to wake up from those modes.

A quick fix to test those modes with `tests/periph_pm` would be

--- a/cpu/cc2538/ldscripts/cc2538sf53.ld
+++ b/cpu/cc2538/ldscripts/cc2538sf53.ld
@@ -21,7 +21,7 @@ MEMORY
 {
     rom (rx)    : ORIGIN = 0x00200000, LENGTH = 512K - 44
     cca         : ORIGIN = 0x0027ffd4, LENGTH = 44
-    ram (w!rx)  : ORIGIN = 0x20000000, LENGTH = 32K
+    ram (w!rx)  : ORIGIN = 0x20004000, LENGTH = 16K
 }
2020-03-10 10:35:46 +01:00
Benjamin Valentin
80392dc644 cpu/cc2538: spi: unify spi_transfer_bytes()
Use a common helper function to read/write the data register.
2020-03-09 16:37:07 +01:00
Benjamin Valentin
68b2c57d2d cpu/cc2538: spi: fix spi_transfer_bytes() with in_buf = NULL
We have to read the DR for every byte that we write.
Just reading DR while SPI is busy in a loop can lead to bytes being
left in the fifo, corrupting subsequent reads.
2020-03-09 16:22:37 +01:00
benpicco
7396d05605
Merge pull request #13575 from fjmolinas/pr_cc2538_rf_deps
cpu/cc2538: handle cc2538_rf deps in Makefile.dep
2020-03-06 18:00:51 +01:00
Francisco Molina
ff6f6618fb
cpu/cc2538: handle cc2538_rf deps in Makefile.dep 2020-03-06 14:17:19 +01:00
Jose Alamos
3ad574a822 drivers/netdev: use netdev_trigger_event_isr function 2020-03-06 14:03:43 +01:00
68ec8b2c2b
Merge pull request #13391 from kaspar030/mpu_feature
cpu/cortex-m: turn MPU support into a feature
2020-03-04 07:09:40 +01:00
a3c527fdbc cpu/*: add cortex_mpu to known-to-support CPU families 2020-03-03 22:59:41 +01:00
Francisco
3f062a78b2
Merge pull request #13045 from aabadie/pr/boards/remote_factorize
boards/remote*: cleanup and factorize code in peripheral configuration headers
2020-03-03 13:21:04 +01:00
d7c0102115
cpu/cortexm: move CPU_ARCH/FAM to Makefile.features 2020-02-17 16:02:48 +01:00
Gunar Schorcht
42db6861e1 cpu/cc2538: fix I2C compilation error with NDEBUG
When NDEBUG macro is defined during compilation, the assert macro produces empty code. The dev parameter is then unused.
2020-01-30 11:57:36 +01:00
Marian Buschsieweke
c4a84f01c0
cpu/cc2538/periph: adc_sample() now returns int32_t 2020-01-10 14:13:14 +01:00
82d1d40042
cpu/cc2538: define radio irq prio at cpu level 2020-01-08 14:41:01 +01:00
Francisco Molina
1801f4f085 cpu/cc2538: add periph_rtt 2020-01-08 09:16:49 +01:00
b01c6707a5 cpu/cc2538: fix typos 2019-11-23 22:39:36 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Yegor Yefremov
df7e760588 doxygen/I2C: don't include overridden typedefs
Add missing #ifndefs to overridden I2C typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:33 +01:00
Yegor Yefremov
cf65070b06 doxygen/GPIO: don't include overridden typedefs
Add missing #ifndefs to overridden GPIO typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:33 +01:00
Yegor Yefremov
fa3b0ff04b doxygen/SPI: don't include overridden typedefs
Add missing #ifndefs to overridden SPI typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:32 +01:00
Yegor Yefremov
5b0252b150 doxygen/ADC: don't include overridden typedefs
Add missing #ifndefs to overridden ADC resolution typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:32 +01:00
5578740fc4
Merge pull request #12397 from fjmolinas/pr_CPU_ARCH_FAM
makefiles/vars.inc.mk: move definition and export of CPU_FAM and CPU_ARCH to vars.inc.mk
2019-10-21 08:23:51 +02:00
Francisco Molina
b4f9b74e1a cpu/cc2*: remove immediate expansion of CPU_ARCH 2019-10-18 08:55:33 +02:00
Francisco Molina
5e9b92a326 cpu: remove CPU_ARCH exports 2019-10-18 08:55:33 +02:00
cba293a9a9
cpu/cc2538: provide gpio feature at cpu level 2019-10-17 22:05:23 +02:00
Kevin "Tristate Tom" Weiss
5bbfe92c11
Merge pull request #12336 from benpicco/cc2538-spi_fix
cpu/cc2538: fix spi_transfer_bytes()
2019-10-02 10:52:16 +02:00