1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-28 23:49:47 +01:00

boards/olimex-msp430-h2618: fix ztimer config

The MSP430 timer prescaler can device the 16 MHz clock down to
(16 / 2^x) MHz, with 0 <= x < 4. So no slower than 2 MHz.

With the current ztimer config the clock would run at twice the speed.
This commit is contained in:
Marian Buschsieweke 2024-04-14 20:26:19 +02:00
parent 3cdc4379b7
commit 43fa3bcfa7
No known key found for this signature in database
GPG Key ID: 77AA882EC78084E6

View File

@ -22,6 +22,7 @@
#define BOARD_H
#include "cpu.h"
#include "macros/units.h"
#ifdef __cplusplus
extern "C" {
@ -35,11 +36,12 @@ extern "C" {
#endif
/**
* @name Xtimer configuration
* @name ztimer configuration
* @{
*/
#define XTIMER_WIDTH (16)
#define XTIMER_BACKOFF (40)
#define CONFIG_ZTIMER_USEC_WIDTH 16 /**< running on a 16-bit timer */
#define CONFIG_ZTIMER_USEC_BASE_FREQ MHZ(2) /**< Cannot divide 16 MHz clock
to 1 MHz, go for 2 MHz instead */
/** @} */
#ifdef __cplusplus