File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed 
doc/guides/advanced_tutorials Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff 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 .
244244This is the same value that is put in the ` max `  field of the ` timer_config ` 
245245structure.
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 
248250static  const  timer_conf_t  timer_config[] = {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments