### TOF_CFG

Bit Field | Read/Write | Field Name | Description
--- | --- | --- | ---
21 | RW | ERROR_INT_ENABLE | Enable the interrupt generation when an error is detected
20 | RW | OVERRUN_INT_ENABLE | Enable the interrupt generation when a data or average data overrun is detected
19 | RW | AVG_DATA_INT_ENABLE | Enable the interrupt generation when a new average data is available
18 | RW | DATA_INT_ENABLE | Enable the interrupt generation when a new data is available
17 | RW | AVG_DATA_DMA_ENABLE | Enable the DMA request when a new average data is available
16 | RW | DATA_DMA_ENABLE | Enable the DMA request when a new data is available
14:12 | RW | AVG_CFG | Select the amount of data for averaging
10:8 | RW | STOP_SRC | Select the source of the external stop trigger
6:4 | RW | START_SRC | Select the source of the external start trigger
1:0 | RW | CLK_PRESCALE | Select the time of flight timer clock prescale

Bit Field | Field Name | Value Symbol | Value Description | Hex Value
--- | --- | --- | --- | ---
21 | ERROR_INT_ENABLE | TOF_ERROR_INT_DISABLE | Disable the error interrupt generation | 0x0*
|  | TOF_ERROR_INT_ENABLE | Enable the error interrupt generation | 0x1
20 | OVERRUN_INT_ENABLE | TOF_OVERRUN_INT_DISABLE | Disable the overrun interrupt generation | 0x0*
|  | TOF_OVERRUN_INT_ENABLE | Enable the overrun interrupt generation | 0x1
19 | AVG_DATA_INT_ENABLE | TOF_AVG_DATA_INT_DISABLE | Disable the average data interrupt generation | 0x0*
|  | TOF_AVG_DATA_INT_ENABLE | Enable the average data interrupt generation | 0x1
18 | DATA_INT_ENABLE | TOF_DATA_INT_DISABLE | Disable the data interrupt generation | 0x0*
|  | TOF_DATA_INT_ENABLE | Enable the data interrupt generation | 0x1
17 | AVG_DATA_DMA_ENABLE | TOF_AVG_DATA_DMA_DISABLE | Disable the average data DMA request | 0x0*
|  | TOF_AVG_DATA_DMA_ENABLE | Enable the average data DMA request | 0x1
16 | DATA_DMA_ENABLE | TOF_DATA_DMA_DISABLE | Disable the data DMA request | 0x0*
|  | TOF_DATA_DMA_ENABLE | Enable the data DMA request | 0x1
14:12 | AVG_CFG | TOF_AVG_DATA_1 | Store the latest data until the next stop trigger occurs | 0x0*
|  | TOF_AVG_DATA_2 | Compute average of 2 consecutive data | 0x1
|  | TOF_AVG_DATA_4 | Compute average of 4 consecutive data | 0x2
|  | TOF_AVG_DATA_8 | Compute average of 8 consecutive data | 0x3
|  | TOF_AVG_DATA_16 | Compute average of 16 consecutive data | 0x4
|  | TOF_AVG_DATA_32 | Compute average of 32 consecutive data | 0x5
|  | TOF_AVG_DATA_64 | Compute average of 64 consecutive data | 0x6
|  | TOF_AVG_DATA_128 | Compute average of 128 consecutive data | 0x7
10:8 | STOP_SRC | TOF_STOP_SRC_NONE | Disable external stop trigger | 0x0*
|  | TOF_STOP_SRC_TX | Select TX radio interrupt to stop the time of flight timer | 0x1
|  | TOF_STOP_SRC_RX_STOP | Select RX_STOP radio interrupt to stop the time of flight timer | 0x2
|  | TOF_STOP_SRC_RX_RECEIVED | Select RX_RECEIVE radio interrupt to stop the time of flight timer | 0x3
|  | TOF_STOP_SRC_SYNC | Select SYNC radio interrupt to stop the time of flight timer | 0x4
|  | TOF_STOP_SRC_TX_FIFO | Select TX_FIFO radio interrupt to stop the time of flight timer | 0x5
|  | TOF_STOP_SRC_RX_FIFO | Select RX_FIFO radio interrupt to stop the time of flight timer | 0x6
6:4 | START_SRC | TOF_START_SRC_NONE | Disable external start trigger | 0x0*
|  | TOF_START_SRC_TX | Select TX radio interrupt to start the time of flight timer | 0x1
|  | TOF_START_SRC_RX_STOP | Select RX_STOP radio interrupt to start the time of flight timer | 0x2
|  | TOF_START_SRC_RX_RECEIVED | Select RX_RECEIVE radio interrupt to start the time of flight timer | 0x3
|  | TOF_START_SRC_SYNC | Select SYNC radio interrupt to start the time of flight timer | 0x4
|  | TOF_START_SRC_TX_FIFO | Select TX_FIFO radio interrupt to start the time of flight timer | 0x5
|  | TOF_START_SRC_RX_FIFO | Select RX_FIFO radio interrupt to start the time of flight timer | 0x6
1:0 | CLK_PRESCALE | TOF_CLK_PRESCALE_1 | Divide the system clock by 1 (SYSCLK @ 8 MHz) | 0x0*
|  | TOF_CLK_PRESCALE_2 | Divide the system clock by 2 (SYSCLK @ 16 MHz) | 0x1
|  | TOF_CLK_PRESCALE_3 | Divide the system clock by 3 (SYSCLK @ 24 MHz) | 0x2
|  | TOF_CLK_PRESCALE_6 | Divide the system clock by 6 (SYSCLK @ 48 MHz) | 0x3