hi... folks
i am using nrf53832 , i want to merge the uart and timer . i tried my level best but timer is not working
help me
thanks in advance
hi... folks
i am using nrf53832 , i want to merge the uart and timer . i tried my level best but timer is not working
help me
thanks in advance
Hi,
Can you elaborate on what you have done / how you have done it, and how it is not working? Have you done any debugging to see what is going on?
yeah , i merged the timer example program with uart . but i couldn't find , my timer is not running
i have given the timer for one minute , when i debug the program , i am getting the data within the seconds , my timer is not running
Can you upload your code so that we can see how you use the timer?
int main(void)
{
bool erase_bonds;
// Initialize.
uart_init();
log_init();
timers_init();
buttons_leds_init(&erase_bonds);
power_management_init();
ble_stack_init();
gap_params_init();
gatt_init();
services_init();
advertising_init();
conn_params_init();
// Start execution.
printf("\r\nUART started.\r\n");
NRF_LOG_INFO("Debug logging for UART over RTT started.");
advertising_start();
twi_init();
MAX30_set_mode();
while(true)
nrf_delay_ms(5000);
m_xfer_done == false;
uint32_t time_ms = 500; //Time(in miliseconds) between consecutive compare events.
uint32_t time_ticks;
uint32_t err_code = NRF_SUCCESS;
//Configure all leds on board.
bsp_board_init(BSP_INIT_LEDS);
//Configure TIMER_LED for generating simple light effect - leds on board will invert his state one after the other.
nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
err_code = nrf_drv_timer_init(&TIMER_SENSOR, &timer_cfg, timer_sensor_event_handler);
APP_ERROR_CHECK(err_code);
time_ticks = nrf_drv_timer_ms_to_ticks(&TIMER_SENSOR, time_ms);
}