Skip to content

Commit 2b27155

Browse files
committed
fixup! fixup! fixup! fixup! doc/guides: Add timer information to Porting Boards
1 parent 49deeae commit 2b27155

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

doc/guides/advanced_tutorials/porting_boards.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,14 @@ pip install --upgrade riotgen
237237

238238
### Timer Width
239239

240-
Some resource constrained or low-power microcontrollers only have 16-bit
241-
wide timer registers available. By default `ztimer` assumes a timer width of
242-
32-bits, so you have to explicitly specify the maximum value the timer register
243-
can hold.
240+
The `ztimer` driver assumes a timer register bit-width of 32-bits by default.
241+
If your microcontroller has a smaller timer register (e.g. 16-bits), you have
242+
to explicitly specify the maximum value the timer register can hold with the
243+
`TIMER_0_MAX_VALUE` define.
244244
This is the same value that is put in the `max` field of the `timer_config`
245245
structure.
246+
Typical values are `0x0000FFFFUL` for 16-bit wide timers, `0x00FFFFFFUL` for
247+
24-bit wide timers and `0xFFFFFFFFUL` for 32-bit wide timers.
246248

247249
```c
248250
static const timer_conf_t timer_config[] = {

0 commit comments

Comments
 (0)