mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +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:
parent
3cdc4379b7
commit
43fa3bcfa7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user