This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why timer's value channel 1 can't big than channel 0?

Hi:

I using timer0's channel_0, channel_1 to drive a ADC, a handle_function.

unfortunately, I discover my timer with channel_1 didn't work when channel_1' value bigger than channel_0.

How should I do?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//=========================================================================
// ADC functions (timer 0, channel_0)
//=========================================================================
void saadc_sampling_event_init(void) {
ret_code_t err_code;
err_code = nrf_drv_ppi_init();
APP_ERROR_CHECK(err_code);
uint32_t timer_compare_event_addr = nrf_drv_timer_compare_event_address_get(&m_timer,
NRF_TIMER_CC_CHANNEL0);
uint32_t saadc_sample_task_addr = nrf_drv_saadc_sample_task_get();
/* setup ppi channel so that timer compare event is triggering sample task in SAADC */
err_code = nrf_drv_ppi_channel_alloc(&m_ppi_channel);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_ppi_channel_assign(m_ppi_channel,
timer_compare_event_addr,
saadc_sample_task_addr);
APP_ERROR_CHECK(err_code);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parents
  • Hi,

    Timer does not have any channel_1, i am not sure which value you are referring to. Can you please be more descriptive of what value is not working.

Reply
  • Hi,

    Timer does not have any channel_1, i am not sure which value you are referring to. Can you please be more descriptive of what value is not working.

Children
No Data