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

31 Commits

Author SHA1 Message Date
Dylan Laduranty
d75595751c cpu/nrf9160: fix gpiote0 vector isr
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-04-08 20:13:45 +02:00
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
MrKevinWeiss
7a68fb0d5e
*Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
MrKevinWeiss
7b80348f31
drivers/ws281x: Fix Kconfig
Patch from https://github.com/RIOT-OS/RIOT/pull/19891#pullrequestreview-1753651538
2023-12-19 11:13:43 +01:00
Marian Buschsieweke
b40ab8f833
cpu/nrf5x_common: implement periph_timer_query_freqs 2023-12-08 23:23:07 +01:00
Dylan Laduranty
5811c847ad cpu/nrfxx: use shared serial IRQ
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-11 22:42:10 +02:00
Dylan Laduranty
72c93a9743 cpu/nrfxx: introduce shared serial IRQ
For now, nRF53 and nRF9160 will shared UART/I2C/SPI IRQs, nRF52 will reuse the same callback but will keep its own file to avoid breakage. This can be continue in a followup PR

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-11 22:39:23 +02:00
Dylan Laduranty
63310189a5 cpu/nrfxx: move I2C/SPI/UART structs to nrf5x_common
This will reduces code duplication across nRF52,nRF53 and nRF9160 families

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-11 20:07:26 +02:00
bors[bot]
a345e00fa6
Merge #19789 #19796 #19802 #19803
19789: cpu/nrf5x/periph/wdt: enable support for nRF53/nRF9160 r=benpicco a=dylad

### Contribution description

This PR enables support for the watchdog driver on nRF53.
This MCU has two watchdog peripherals, for now, it only uses the first one.
The use of the second watchdog can be add in a followup PR later.


### Testing procedure
Flash and play with `tests/periph/wdt` application.


### Issues/PRs references
None.


19796: boards/b_u585i_ iot02a/periph usbdev r=benpicco a=gschorcht

### Contribution description

This PR adds the USB OTG support for STM32U5 and the `b_u585i_iot02a` board.

This PR includes PR #19795 since it uses directly the changes made in PR #19795.

### Testing procedure

Compile and flash
```
BOARD=b-u585i-iot02a make -C tests/sys/usbus_cdc_ecm/ flash term
```
Use the `sudo dmesg` command to get the kernel messages.
```pyhon
[766948.556645] usb 1-2.2: new full-speed USB device number 108 using xhci_hcd
[766948.658688] usb 1-2.2: New USB device found, idVendor=1209, idProduct=7d00, bcdDevice= 1.00
[766948.658696] usb 1-2.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[766948.658699] usb 1-2.2: Product: b-u585i-iot02a
[766948.658702] usb 1-2.2: Manufacturer: RIOT-os.org
[766948.658704] usb 1-2.2: SerialNumber: AA140057DA41D467
[766948.668681] cdc_ether 1-2.2:1.0 usb0: register 'cdc_ether' at usb-0000:00:14.0-2.2, CDC Ethernet Device, ea:dc:44:71:d9:24
[766948.743250] cdc_ether 1-2.2:1.0 enxeadc4471d924: renamed from usb0
```
Use the `ifconfig` command on the node to determine the IPv6 LLUA and ping the node.
```
ping6 -c 3 fe80::e8dc:44ff:fe71:c524%enxeadc4471d924
PING fe80::e8dc:44ff:fe71:c524%enxeadc4471d924(fe80::e8dc:44ff:fe71:c524%enxeadc4471d924) 56 data bytes
64 bytes from fe80::e8dc:44ff:fe71:c524%enxeadc4471d924: icmp_seq=1 ttl=64 time=0.523 ms
64 bytes from fe80::e8dc:44ff:fe71:c524%enxeadc4471d924: icmp_seq=2 ttl=64 time=0.546 ms
64 bytes from fe80::e8dc:44ff:fe71:c524%enxeadc4471d924: icmp_seq=3 ttl=64 time=0.599 ms
```

### Issues/PRs references

Includes PR #19795 

19802: cpu/nrf53: enable flashpage support r=benpicco a=dylad

### Contribution description
This PR enables flashpage support on nRF53 family.
The peripheral is identical to nRF52, just add the flashpage configuration and enable the module in both Makefiles.features and Kconfig.


### Testing procedure
run `/tests/periph/flashpage` on `nrf5340dk-app`

output of `make BOARD=nrf5340dk-app flash test`


```
/home/dylan/work/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200" --no-reconnect --noprefix --no-repeat-command-on-empty-line 
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.

> 
> 
test_last_raw

> test_last_raw
wrote raw short buffer to last flash page
> help
help
Command              Description
---------------------------------------
info                 Show information about pages
dump                 Dump the selected page to STDOUT
dump_local           Dump the local page buffer to STDOUT
read                 Copy the given page to the local page buffer and dump to STDOUT
write                Write the local page buffer to the given page
write_raw            Write (ASCII, max 64B) data to the given address
erase                Erase the given page buffer
edit                 Write bytes to the local page buffer
test                 Write and verify test pattern
test_last_pagewise   Write and verify test pattern on last page available
test_last_pagewise
test_reserved_pagewise Write and verify short write on reserved page
test_last_raw        Write and verify raw short write on last page available
> test_last_pagewise
wrote local page buffer to last flash page
> help
help
Command              Description
---------------------------------------
info                 Show information about pages
dump                 Dump the selected page to STDOUT
dump_local           Dump the local page buffer to STDOUT
read                 Copy the given page to the local page buffer and dump to STDOUT
write                Write the local page buffer to the given page
write_raw            Write (ASCII, max 64B) data to the given address
erase                Erase the given page buffer
edit                 Write bytes to the local page buffer
test                 Write and verify test pattern
test_last_pagewise   Write and verify test pattern on last page available
test_reserved_pagewise Write and verify short write on reserved page
test_reserved_pagewise
test_last_raw        Write and verify raw short write on last page available
> test_reserved_pagewise
Reserved page num: 5 
Since the last firmware update this test has been run 0 times 
wrote local page buffer to reserved flash page

When running on a bootloader, as an extra check, try restarting the board and check whether this application still comes up.
> help
help
Command              Description
---------------------------------------
info                 Show information about pages
dump                 Dump the selected page to STDOUT
dump_local           Dump the local page buffer to STDOUT
read                 Copy the given page to the local page buffer and dump to STDOUT
write                Write the local page buffer to the given page
write_raw            Write (ASCII, max 64B) data to the given address
erase                Erase the given page buffer
edit                 Write bytes to the local page buffer
test                 Write and verify test pattern
test_last_pagewise   Write and verify test pattern on last page available
test_reserved_pagewise Write and verify short write on reserved page
test_last_raw        Write and verify raw short write on last page available
> 
make : on quitte le répertoire « /home/dylan/work/RIOT/tests/periph/flashpage »

```
### Issues/PRs references
None.


19803: cpu/nrf5x_common: rework LFCLK source selection r=benpicco a=dylad

### Contribution description
This PR changes the source selection of LFCLK for all nRF families.
This idea is to use the values provided by Nordic vendor files to properly populate the source of the LFCLK. Then setup a per CPU check to ensure the value provided at board level is fine. In the end, the LFCLK source selection is a mere assignment.
The selection of the LFCLK source is still done at board level. I also add a bit of documentation to help users to select another value if needed.


I'll provide in a followup PR, `periph_rtt` support for both nRF9160 and nRF53.

### Testing procedure
CI should be enough I think. Otherwise, one can ran tests/periph/rtt on any nRF51-based board and any nRF52-based board.
You can also change the LFCLK source at board level to ensure the guards are doing their jobs.

### Issues/PRs references
None.

Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-07-06 14:57:33 +00:00
Dylan Laduranty
1d0177dc31 cpu/nrfxx: simplify LFCLK source selection
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-06 15:47:22 +02:00
Dylan Laduranty
1df1279de5 cpu/nrf{53,9160}: enable periph_wdt in Kconfig
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-05 09:50:02 +02:00
bors[bot]
ddf1fe252d
Merge #19733 #19747 #19769 #19782
19733: cpu/msp430: reorganize code r=maribu a=maribu

### Contribution description

RIOT supports two distinct families of the MSP430: The [MSP430 x1xx] MCU family and the [MSP430 F2xx/G2xx] MCU family. For both incompatible MCU families the code was located in the msp430fxyz folder, resulting in case of the UART driver in particularly bizarre code looking roughly like this:

```C
#ifndef UART_USE_USCI
/* implementation of x1xx peripheral ... */
#else
/* implementation of F2xx/G2xx peripheral ... */
#endif
/* zero shared code between both variants */
```

This moves peripheral drivers shared between the two families to msp430_common and splits the SPI and UART driver into two MCU families.

In addition, it cleans up the `msp430_regs.h` by dropping most of it and using the macros and symbols provided by the vendor header files. There is little reason for us to maintain constants when TI is already doing that.

[MSP430 x1xx]: https://www.ti.com/lit/ug/slau049f/slau049f.pdf
[MSP430 F2xx/G2xx]: https://www.ti.com/lit/ug/slau144k/slau144k.pdf


19747: gnrc/ipv6/nib: reset rs_sent counter also for not-6LN interfaces r=maribu a=fabian18



19769: cpu/nrf53: add initial support with nRF5340DK-APP board r=maribu a=dylad

### Contribution description

This PR adds support for nRF5340 MCU and its associated Nordic development board, nRF5340DK.
This MCU provides a dual Cortex-M33, one application core running at up to 128MHz, and one network core running at up to 64MHz.
Peripherals are inherited from others Nordic MCUs families so it shouldn't be hard to add more of them in followup PRs.

For now, only the minimal set of peripherals is supported:
- GPIO / GPIO_IRQ
- UART
- TIMER

### Testing procedure
Build the usual test application for the supported peripherals and flash the board.
nRF5340DK provides two serial ports on its embedded debugger. RIOT's shell should be available on the first one (/dev/ttyACM0)


### Issues/PRs references
#18576
#19267 


19782: cpu/msp430: fix for ti's msp430-gcc-opensource package ld version r=maribu a=hugueslarrive

### Contribution description
My msp430 toolchain (https://www.ti.com/tool/MSP430-GCC-OPENSOURCE) was broken by #19484:
```
hugues@p700:~/github/cpu_msp430_common/RIOT$ BOARD=msb-430 make -j64 -C examples/hello-world
make : on entre dans le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
Building application "hello-world" for "msb-430" with MCU "msp430fxyz".

"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core/lib
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers/periph_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/auto_init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/div
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/libc
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/malloc_thread_safe
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/newlib_syscalls_default
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz/periph
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/preprocessor
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/stdio_uart
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common/periph
/opt/ti/msp430-gcc/bin/../lib/gcc/msp430-elf/9.3.1/../../../../msp430-elf/bin/ld: .rodata not found for insert
collect2: error: ld returned 1 exit status
make: *** [/home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/../../Makefile.include:761 : /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/bin/msb-430/hello-world.elf] Erreur 1
make : on quitte le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version
GNU ld (Mitto Systems Limited - msp430-gcc 9.3.1.11) 2.34
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version | grep -Eo '[0-9]\.[0-9]+'
9.3
1.11
2.34
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version | grep -Eo '[0-9]\.[0-9]+$'
2.34
```


### Testing procedure
```
hugues@p700:~/github/cpu_msp430_common/RIOT$ BOARD=msb-430 make -j64 -C examples/hello-world
make : on entre dans le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
Building application "hello-world" for "msb-430" with MCU "msp430fxyz".

"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core/lib
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers/periph_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/auto_init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/div
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/libc
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/malloc_thread_safe
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/newlib_syscalls_default
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/preprocessor
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/stdio_uart
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz/periph
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common/periph
   text	   data	    bss	    dec	    hex	filename
   8612	    722	    866	  10200	   27d8	/home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/bin/msb-430/hello-world.elf
make : on quitte le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
```


### Issues/PRs references
Introduced by #19484, highlighted in #16727.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-07-04 18:43:26 +00:00
Dylan Laduranty
5df8bf6fca cpu/nrfxx: move uart_conf_t struct to periph_cpu_common.h
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-04 17:18:18 +02:00
dylad
1e0b58a5a4 cpu/nrf9160: remove duplicate set of SEVONPEND bit
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2023-06-28 18:42:30 +02:00
Marian Buschsieweke
c3500eb6e0
tree wide: fix typos in comments found by codespell
This will not change generated binaries, only the Doxygen output and
source code will have less typos.
2023-05-02 09:52:06 +02:00
Benjamin Valentin
124b849503 cpu: call early_init() 2023-01-08 22:26:12 +01:00
Benjamin Valentin
516b4b6c7f cpu/nrf51: use cortexm.ld 2022-09-23 15:55:05 +02:00
Karl Fessel
05f114d0af doc: fix unbalaced grouping
- most were trivial
    - missing group close or open
    - extra space
    - no doxygen comment
- name commad might open an implicit group
    this hould also be implicit cosed but does not happen somtimes
- crazy: internal declared groups have to be closed internal
2022-09-14 15:05:25 +02:00
Benjamin Valentin
7b7eb9d17b cpu/nrf5x: allow multiple I2C and SPI buses on a shared periph 2022-08-30 10:05:34 +02:00
Benjamin Valentin
14b5eca22d cpu/nrf9160: add locking for shared peripherals 2022-08-19 15:47:53 +02:00
Marian Buschsieweke
f0586dbf8f
cpu/nrf5x_common: implement periph/gpio_ll{,_irq}
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2022-04-23 19:47:00 +02:00
chrysn
facb5e633f
Merge pull request #17436 from Ollrogge/reserve_flash
cpu: add flash_writable section to linker script
2022-03-17 21:44:32 +01:00
Ollrogge
41f961a197 periph/flashpage: Add _in_address_space feature 2022-03-17 19:45:54 +01:00
Francisco Molina
4906353cfe cpu/nrf52-9160: add periph_spi_init_gpio 2022-02-08 09:17:48 +01:00
Francisco Molina
4aaf8f12a0 cpu/nrf9160: add Kconfig dependencies 2021-12-02 07:51:21 +01:00
Dylan Laduranty
25b168c34f boards/nrf9160dk: add riotboot to FEATURES_PROVIDED 2021-11-18 23:05:42 +01:00
Dylan Laduranty
6671aada97 cpu/nrf9160: add FLASHPAGE* feature to Kconfig 2021-11-17 17:25:36 +01:00
Dylan Laduranty
cc440bc296 cpu/nrf9160: add flashpage configuration 2021-11-17 14:06:04 +01:00
dylad
1beda0f1e4 cpu/nrf9160: add TWI and SPI support 2021-09-06 20:15:18 +02:00
Dylan Laduranty
9582ec9b5c kconfig: add Kconfig support for nRF9160 cpu and nRF9160DK board 2021-07-28 20:11:26 +02:00
dylad
5b85a5750e cpu/nrf9160: add initial support 2021-07-28 20:11:26 +02:00