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

97 Commits

Author SHA1 Message Date
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
Marian Buschsieweke
675dcc381c
cpu/msp430: rework MSP430 x1xx periph drivers
- Move common code for USART (shared SPI / UART peripheral) to its
  own file and allow sharing the USART peripheral to provide both
  UART and SPI in round-robin fashion.
- Configure both UART and SPI bus via a `struct` in the board's
  `periph_conf.h`
    - this allows allocating the two UARTs as needed by the use case
    - since both USARTs signals have a fixed connection to a single
      GPIO, most configuration is moved to the CPU
    - the board now only needs to decide which bus is provided by
      which USART

Note: Sharing an USART used as UART requires cooperation from the app:
- If the UART is used in TX-only mode (no RX callback), the driver
  will release the USART while not sending
- If the UART is used to also receive, the application needs to power
  the UART down while not expecting something to send. An
  `spi_acquire()` will be blocked while the UART is powered up.
2024-01-22 16:59:23 +01:00
Marian Buschsieweke
b51ea4ca24
boards: clean up MSP430 board configuration
Move common configuration for MSP430 based boards to
`boards/common/msp430` and make use of that.
2023-12-10 09:11:24 +01:00
Marian Buschsieweke
7044699388
cpu/msp430: improve periph_timer
- add support for multiple timers
- add support for selecting clock source in the board's `periph_conf.h`
- add support for the prescaler
- implement `periph_timer_query_freqs`
- add a second timer to all MSP430 boards
    - the first timer is fast ticking, high-power
    - the second is slow ticking, low-power
2023-12-10 09:11:23 +01:00
Marian Buschsieweke
45b353c6ef
cpu/msp430: make use of vendor header files
The MSP430 vendor files already provide macros containing register
constants and symbols (provided via linker scripts) containing addresses
of peripheral registers. So lets make use of that rather than
maintaining a long list of constants.
2023-07-04 20:21:05 +02:00
Marian Buschsieweke
ff7f8ae2f0
cpu/msp430: reorganize code
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:

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

This splits the peripheral drivers for USCI and USART serial IP blocks
into separate files and relocates everything in cpu/msp430, similar to
how cpu/stm32 is organized.

[MSP430 x1xx]: https://www.ti.com/lit/ug/slau049f/slau049f.pdf
[MSP430 F2xx/G2xx]: https://www.ti.com/lit/ug/slau144k/slau144k.pdf
2023-06-19 17:14:57 +02:00
Marian Buschsieweke
df5c319978
cpu/msp430fxyz: clean up clock initialization
Provide a common clock initialization driver rather than leaving
clock initialization to the boards code. A declarative description of
the board's clock configuration using a struct does still allow to
fine-tune settings. In addition, a board is still allowed to just
provide a custom `void clock_init(void)` if there really is the need
to do crazy things.
2023-05-16 10:05:09 +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
MrKevinWeiss
29c3e7d87b
boards/*/Kconfig: Fix simple kconfig models 2022-02-01 13:58:08 +01:00
Francisco Molina
7ab05fa129 cpu/msp430: add Kconfig 2021-12-02 16:33:19 +01:00
MrKevinWeiss
1acf37c6f3 boards/msb-430: Remove unused UART_x_EN macro 2020-09-09 10:25:37 +02:00
Leandro Lanzieri
95127dea5c
boards/msb-430h: Add Kconfig symbols 2020-06-24 09:31:38 +02:00
Marian Buschsieweke
137cc289c6
boards/msb-430h: Fix units & alignment in doc 2020-06-16 11:36:48 +02:00
Gunar Schorcht
f7a40c1a6f boards/msb-430h: fix broken links 2020-03-24 10:38:40 +01:00
713fead00a
boards: move some USEMODULE to Makefile.dep 2020-02-07 13:21:22 +01:00
cladmi
6be662a48b
boards/msp30: use common/msb-430/Makefile.features
Use the common `msb-430/Makefile.features` instead of duplicating the
`cpu` include.
2019-07-01 18:09:57 +02:00
a68f78bb10
boards/*: remove unused FEATURES_MCU_GROUP variable 2019-06-14 11:32:15 +02:00
cladmi
b450141d4d
boards: unconditionally include CPU/Makefile.features
The file always exist so no need to do '-include'.

Replaced using:

    sed -i 's|-\(include $(RIOTCPU)/.*/Makefile.features\)|\1|' \
        $(git grep -l  '$(RIOTCPU)/.*/Makefile.features' boards)
2018-10-11 17:13:40 +02:00
Joakim Nohlgård
8996cbe313 make: Introduce new feature flag periph_gpio_irq 2018-08-29 08:53:20 +02:00
Jose Alamos
7b28fbf110 boards: fix Doxygen group directives 2018-08-01 15:24:55 +02:00
Jose Alamos
a1e17ab5af doc: add wiki documentation to Doxygen files 2018-08-01 15:24:54 +02:00
Marian Buschsieweke
de9b67bdc2
drivers/sht1x: Major refactoring
- Use RIOT's GPIO interface to access the sensor to increase portability
- Changed API to allow more than one sensor per board
- Added `sht1x_params.h` that specifies how the sensors is connected - each
  board can overwrite default settings by #defining SHT1X_PARAM_CLK and
  SHT1X_PARAM_DATA
- Changed arithmetic to use integer calculations only instead of floating point
  arithmetic
- Added support for checking the CRC sum
- Allow optional skipping of the CRC check to speed up measuring
- Added support for advanced features like reducing the resolution and skipping
  calibration to speed up measuring
- Allow specifying the supply voltage of sensor which heavily influences the
  temperature result (and use that information to calculate the correct
  temperature)
- Reset sensor on initialization to bring it in a well known state
- Support for the obscure heater feature. (Can be useful to check the
  temperature sensor?)
- Updated old SHT11 shell commands to the new driver interface, thus allowing
  more than one SHT10/11/15 sensor to be used
- Added new shell command to allow full configuration of all attached SHT1x
  sensors
- Removed old command for setting the SHT11 temperature offset, as this feature
  is implemented in the new configuration command
2018-06-27 08:58:00 +02:00
Hauke Petersen
6c118cfc0b boards/msb-430: move shared code to common/msb-430 2017-11-30 10:26:35 +01:00
Hauke Petersen
abf5da085f boards: remove non-existent feature 'config' 2017-11-09 09:50:21 +01:00
Hauke Petersen
e116fd961f boards/msp430-based: removed flashpage feature
This feature is already defined by the (common) CPU implementation,
so no need to re-define it for each board.
2017-11-08 17:09:18 +01:00
02e055fc81 make: include cpu Makefile.features from board Makefile.features 2017-09-14 13:15:52 +02:00
Hauke Petersen
25f285f1d1 cpu/msp430: added flashpage driver implementation 2017-08-29 12:08:33 +02:00
0fcc7d3834 cleanup: apply headerguard script output 2017-05-24 17:54:02 +02:00
882bcff048 boards: replace @brief with @name when necessary 2017-04-13 12:10:30 +02:00
Bas Stottelaar
3b14a584b8 boards: *: remove SPI_*_EN now rework is merged 2017-01-31 19:38:41 +01:00
ebc35a0613 boards: fix doxygen @brief in periph.conf 2017-01-27 10:31:56 +01:00
Hauke Petersen
d5e00e594a cpu/msp430fxyz+boards: adapted to new SPI API
- adapted the SPI driver
- adapted all boards using the CPU
2017-01-25 16:46:05 +01:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
Hauke Petersen
363b883d51 boards: fixed doxygen in msp430 and x86 board.h 2016-03-15 18:37:54 +01:00
Hauke Petersen
a5c2a2875e boards/msb-430h: unified LED defines 2016-03-15 16:24:49 +01:00
Hauke Petersen
c11517138e boards/msb-430: cleanup in common files
- renamed board-conf.h to board_common.h
- moved common defines to board_common.h
2016-03-15 15:48:46 +01:00
Joakim Nohlgård
49a7368c33 Merge pull request #4970 from kaspar030/fix_board_common_module_names
boards: fix board common module names
2016-03-08 14:06:03 +01:00
08b8ac4ba1 boards: msb-430: fix common module name 2016-03-05 23:47:51 +01:00
Hauke Petersen
08d1e8de91 boards/msb-430(h): style fixed in board.h
fixed indention and parens for LED defines
2016-02-24 15:59:14 +01:00
Hauke Petersen
6dc4f0d007 boards/msb-430(h): added LED_GREEN_x macros 2016-02-18 17:17:27 +01:00
Hauke Petersen
db25206a58 boards: use default values for STDIO defines 2016-01-05 12:08:31 +01:00
Hauke Petersen
ac2b9f2524 boards: changed module name to 'board' 2015-12-07 17:53:22 +01:00
Hauke Petersen
a4372ce514 boards/msb-430h: adjusted to UART changes 2015-10-27 14:59:38 +01:00
Hauke Petersen
528e832c90 boards: cleaned up entries in Makefile.features 2015-10-21 16:45:21 +02:00
Hauke Petersen
e395dfd91e boards: s/GPIO(x,y)/GPIO_PIN(x,y)/ 2015-10-13 14:59:53 +02:00
Hauke Petersen
a3e11cad93 boards: s/TIMER_DEV/TIMER_BASE/ for msp430 boards 2015-09-17 13:57:58 +02:00
Hauke Petersen
fd693ee092 boards/msb-430h: added SPI configuration 2015-09-17 11:32:38 +02:00
Hauke Petersen
c531d157e3 boards/msb-430xx: Makefile cleanup 2015-09-16 18:08:25 +02:00
44cdec0e1e boards: msp430*: added (x)timer XTIMER_SHIFT_ON_COMPARE values 2015-09-16 11:13:41 +02:00
ffd87aacc4 boards: msb-430h: remove hwtimer from board.h 2015-09-16 10:58:53 +02:00