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

26815 Commits

Author SHA1 Message Date
benpicco
82134ad77a
Merge pull request #13323 from francois-berder/mbedlpc1768-doc
boards: mbed_lpc1768: Improve documentation
2020-02-10 23:07:27 +01:00
Benjamin Valentin
9f4920329b cpu/lpc2387: clear BODR if POR is set
From the data sheet:

> **Note:** Only in case when a reset occurs and the POR = 0, the BODR bit
indicates if the V DD(DCDC)(3V3) voltage was below 2.6 V or not.

So the value of BODR is undefined if POR is set.
Clear it to bring it to a defined state.
2020-02-10 23:04:47 +01:00
Benjamin Valentin
76e19602a2 cpu/lpc2387: rename cpu_woke_from_backup()
The function would always return `true` after early boot, so it
is not very useful for applications.

Now it will only (but always) return true when we woke from Deep Sleep
*after* early boot. This makes it behave the same ways as the function
of the same name on SAME54.

Rename the existing function to cpu_backup_ram_is_initialized() to better
match it's semantics.
2020-02-10 23:04:47 +01:00
Benjamin Valentin
64107dd3a9 cpu/lpc2387: rtc: only initialize RTC after cold boot or external reset
On the MCB2388 plugging the power will result in both the POR and EXTR
bit being set.
Not sure if this is a property of the board, but it means RTC is also
reset after programming, so it behaves just like Backup RAM.

If we woke from Deep Sleep the POR bit will be cleared, so the RTC is not
reset.
2020-02-10 23:04:47 +01:00
Benjamin Valentin
80dde82c86 cpu/lpc2387: clear POR bit if we woke from Deep Sleep
RSIR is 0x1 (POR) if we woke from Deep Sleep.
This makes it hard to distinguish between real power-on and waking from
Deep Sleep, which is why the Backup RAM signature was introduced.

However, calling cpu_woke_from_backup() a second time will always return
true, as the signature will have been set up by early boot then.

Thus, clear the POR bit if the signature was already in place.
The result is:

	RSIR == 0 -> woke from sleep
	RSIR == 1 -> cold boot
2020-02-10 23:04:46 +01:00
Benjamin Valentin
6dbbc8f33a cpu/lpc2387: rtc: remove _rtc_set()
Calling localtime() adds considerable overhead.
There are easier ways to set the date to 1970.

For tests/periph_rtc this results in this ROM change:

master:

   text    data     bss     dec     hex
  31328     240   98064  129632   1fa60

with this patch:

   text    data     bss     dec     hex
  20036     140   98168  118344   1ce48
2020-02-10 23:04:46 +01:00
Marian Buschsieweke
fec0f8dd48
boards/waspmote-pro: Refactor avrdude conf 2020-02-10 21:48:03 +01:00
Marian Buschsieweke
21b37a3f5e
boards/mega-xplained: Refactor avrdude conf 2020-02-10 21:48:03 +01:00
Marian Buschsieweke
ff53159f0e
boards/atmega256rfr2-xpro: Refactor avrdude conf
- No longer include `tools/serial.mk` and `tools/avrdude.mk`, as this is
  no done by `boards/common/atmega`
- No longer provide `RESET ?=`, as this is now done in `tools/avrdude.mk` for
  all ATmega boards unless they are using a bootloader
2020-02-10 21:48:03 +01:00
Marian Buschsieweke
26b4da2db2
boards/avr-rss2: Refactor avrdude conf 2020-02-10 21:48:03 +01:00
Marian Buschsieweke
e042bb43e1
boards/derfmega*: Refactor avrdude conf 2020-02-10 21:48:03 +01:00
b685b4d720
Merge pull request #13303 from chrysn-pull-requests/doc-libcose
pkg/libcose: Add to documentation
2020-02-10 20:36:21 +01:00
Francois Berder
056c1e568c boards: mbed_lpc1768: Improve documentation
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2020-02-10 19:29:55 +00:00
Martine Lenders
ebb20f2d44
Merge pull request #13305 from miri64/gnrc_ipv6_ext_frag_stats/feat/initial
gnrc_ipv6_ext_frag: initial import of statistics module
2020-02-10 20:23:13 +01:00
e27a0be577
Merge pull request #13328 from bergzand/pr/docs/display_group
drivers: Add display device doxygen group
2020-02-10 20:19:16 +01:00
benpicco
4f8114a09f
Merge pull request #12793 from benpicco/ws281x_vt100
drivers/ws281x: add VT100 backend for native
2020-02-10 18:23:07 +01:00
Francisco
e2dc125fb3
Merge pull request #13308 from maribu/atmega_state_cleanup
cpu/atmega_common: Cleanup state flags
2020-02-10 17:37:24 +01:00
chrysn
2c83308ec2 pkg/libcose: Add to documentation 2020-02-10 17:15:57 +01:00
Marian Buschsieweke
60ee8cd513
cpu/atmega_common: Fix pm_reboot with LTO
The reboot process for ATmegas is to enable the watchdog timer and loop until
the wdt reboots this MCU. However, this reboot will keep the wdt configuration,
so that the wdt needs to be disabled during boot. This is done in get_mcusr,
but without the attribute "used" it will be optimized out in LTO builds. This
commits adds the attribute "used" to get_mcusr.

Also simplified the backward compatibility with older ATmegas (currently not
supported by RIOT) on outdated versions of avrlibc.
2020-02-10 17:08:09 +01:00
benpicco
b44cf48a87
Merge pull request #13246 from benpicco/lpc23xx-spi
cpu/lpc2387: make SPI configurable
2020-02-10 17:01:41 +01:00
benpicco
0b04f61d3b
Merge pull request #12911 from benpicco/lpc2387-adc
cpu/lpc2387: implement periph/adc
2020-02-10 16:13:07 +01:00
benpicco
f997f42ade
Merge pull request #13304 from miri64/gnrc_sixlowpan_frag_stats/enh/count-avg-fragments
gnrc_sixlowpan_frag_stats: add average fragments per datagram statistic
2020-02-10 15:23:52 +01:00
Marian Buschsieweke
f5d9f29b57
boards/arduino-leonardo: Refactor avrdude conf 2020-02-10 15:01:27 +01:00
Marian Buschsieweke
7f4782e3e6
boards/arduino-duemilanove: Refactor avrdude conf 2020-02-10 15:01:06 +01:00
Marian Buschsieweke
c1c25b0644
boards/arduino-nano: Refactor avrdude conf
- Use the common logic to translate from a bootloader to concrete flasher flags
- Extended documentation on how to use optiboot as alternative bootloader, as
  the stock bootloader is affected by a bug preventing the use of RIOT's
  pm_reboot() implementation
2020-02-10 14:59:24 +01:00
Marian Buschsieweke
88b90ee4af
boards/arduino-uno: Refactor avrdude conf 2020-02-10 14:59:06 +01:00
Marian Buschsieweke
23531b3a73
boards/arduino-mega2560: Refactor avrdude conf 2020-02-10 14:58:18 +01:00
Marian Buschsieweke
750d3078e4
boards/common/arduino-atmega: Refactoring
- including `avrdude.mk` and `serial.mk` is no longer needed
- the avrdude flag -F is dropped
    - This allows flashing a board having an MCU different to the one
      RIOT was compiled for
    - It is better to let the user provide this flag manually if she/he really
      wants to turn safety off, knows what she/he is doing, and accepts the
      risk associated with this
- the avrdude flag -D is dropped
    - This disables issuing an erase command during flashing, however this
      erase cycle is strictly required to be able to program the flash
    - This is only needed in case of the stk500v2 bootloader, which implicitly
      does the erase cycle and fails if explicitly asked to do so
    - Only for the stk500v2 bootloader this flag is now added
2020-02-10 14:52:07 +01:00
Marian Buschsieweke
95704348ae
boards/common/atmega: Refactor flash & serial conf
- Include `tools/avrdude.mk` and `tools/serial.mk` at the common place instead
  for each ATmega based board individually
- Introduce the makefile variable BOOTLOADER to de-duplicate flash configs:
    - Two boards using the same bootloader now just use `BOOTLOADER ?= foo`
      and share the individual config
    - These settings are not applied when `PROGRAMMER` is set to still allow
      users to manually specify how to program their board
2020-02-10 14:48:39 +01:00
Benjamin Valentin
11d77271cf drivers/ws281x: introduce WS281X_HAVE_INIT
This brings the backend-dependant init() function in line with
`WS281X_HAVE_PREPARE_TRANSMISSION` and `WS281X_HAVE_END_TRANSMISSION`.
2020-02-10 14:45:26 +01:00
Benjamin Valentin
720eff3416 tests/driver_ws281x: allow build on native
Also add an additional newline before each test title to improve
the rendering on native console output.
2020-02-10 14:45:26 +01:00
Benjamin Valentin
8352e4aae0 drivers/ws281x: add VT100 backend for native
To quickly iterate on animations it is handy to being able to simulate
the output on native.

This adds a VT100 terminal backend to the ws281x driver that outputs
the colors straight to the terminal.
2020-02-10 14:40:15 +01:00
6b2478953c
pcd8544: move to display devices doxygen group 2020-02-10 14:11:17 +01:00
7ade31ad5b
ili9341: move to display devices doxygen group 2020-02-10 14:11:05 +01:00
d070f2924d
hd44780: move to display devices doxygen group 2020-02-10 14:10:46 +01:00
965a0f9c9a
dsp0401: move to display devices doxygen group 2020-02-10 14:10:18 +01:00
8a481abc90
drivers: Add display devices doxygen group 2020-02-10 14:09:57 +01:00
2e32a11822
Merge pull request #13326 from aabadie/pr/doc/ili9341_cleanup
drivers/ili9341: cleanup doxygen documentation
2020-02-10 14:08:35 +01:00
Benjamin Valentin
d675eb7cbb boards/mcb2388: update SPI configuration 2020-02-10 13:41:00 +01:00
Benjamin Valentin
4342d81220 boards/mcb2388: add ADC configuration
The MCB2388 has a potentiometer connected to an ADC input.
2020-02-10 13:25:26 +01:00
Benjamin Valentin
9c0dfaada9 boards/msba2: add ADC configuration
ADC pins are on the AD/DA pins (JP8).
Configure AD0.0 - AD0.2 as laid out on the board schematics.
2020-02-10 13:25:26 +01:00
Benjamin Valentin
13e578bc84 cpu/lpc2387: implement periph/adc
lpc23xx has a 10 bit ADC with up to 8 channels.

The ADC should be clocked at 4.5 MHz or less, so it uses
(72MHz CCLK / 8) / 2.
2020-02-10 13:25:26 +01:00
e573d8b57f
drivers/ili9341: cleanup doxygen documentation 2020-02-10 11:46:01 +01:00
1ad14f3c79 Merge pull request #13322 from francois-berder/cleanup-numof
boards: Use ARRAY_SIZE for setting UART_NUMOF, SPI_NUMOF, I2C_NUMOF
2020-02-10 11:38:51 +01:00
Marian Buschsieweke
eb6b830955
drivers/ina2xx: Fixed missing i2c_acquire/release 2020-02-10 10:32:27 +01:00
Francois Berder
b4ab22673e boards: Use ARRAY_SIZE for setting UART_NUMOF, SPI_NUMOF, I2C_NUMOF
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2020-02-09 20:55:46 +00:00
Benjamin Valentin
e03780c8ca cpu/sam0_common: update samd21 vendor files to version 1.3.395
This release adds EXTINT defines compatible with later versions of
the sam0 series of MCUs.
2020-02-08 03:28:14 +01:00
Dylan Laduranty
b5bb846d3a
Merge pull request #13312 from benpicco/cpu/sam0-vendor_cleanup
cpu/sam0_common: use vendor provided MCU header dispatch
2020-02-07 20:33:45 +01:00
Gunar Schorcht
c585535640
Merge pull request #13291 from aabadie/pr/boards/makefile_dep
boards: move remaining uses of USEMODULE from Makefile.include to Makefile.dep
2020-02-07 16:16:02 +01:00
Francisco Molina
238d56e474
cpu/samd21/cpu: reset GCLK before configuring them 2020-02-07 16:11:42 +01:00