Loading...
Searching...
No Matches
hardware_ticks

Hardware Tick API. More...

Typedefs

typedef enum tick_gen_num_rp2350 tick_gen_num_t
 Tick generator numbers on RP2350 (used as typedef tick_gen_num_t)
 

Enumerations

enum  tick_gen_num_rp2350 {
  TICK_PROC0 = 0 , TICK_PROC1 = 1 , TICK_TIMER0 = 2 , TICK_TIMER1 = 3 ,
  TICK_WATCHDOG = 4 , TICK_RISCV = 5 , TICK_COUNT
}
 Tick generator numbers on RP2350 (used as typedef tick_gen_num_t)
 

Functions

void tick_start (tick_gen_num_t tick, uint cycles)
 Start a tick generator.
 
void tick_stop (tick_gen_num_t tick)
 Stop a tick generator.
 
bool tick_is_running (tick_gen_num_t tick)
 Check if a tick genererator is currently running.
 

Detailed Description

Hardware Tick API.

The RP2350 has a dedicated Tick block that is used to supply ticks to TIMER0, TIMER1, RISC-V platform timer, Arm Cortex-M33 0 timer, Arm Cortex-M33 1 timer and the WATCHDOG block.

Function Documentation

◆ tick_is_running()

bool tick_is_running ( tick_gen_num_t  tick)

Check if a tick genererator is currently running.

Parameters
tickThe tick generator number
Returns
true if the specific ticker is running.

◆ tick_start()

void tick_start ( tick_gen_num_t  tick,
uint  cycles 
)

Start a tick generator.

Parameters
tickThe tick generator number
cyclesThe number of clock cycles per tick

◆ tick_stop()

void tick_stop ( tick_gen_num_t  tick)

Stop a tick generator.

Parameters
tickThe tick generator number