Hello to all,
I am using nRF52840 with SES SDK15.0 version. My device is goes into sleep mode after sending data to server. But when woke up device for first reading data successfully send and it will goes into sleep mode. After few minute it wakeup that time not able to ON proper ADC and UART functionality. Also i am struggling for debug because not showing any error it shows only unknown fuction at 0x000978 like this.
Please help me how i can fix this issue, here is my bellow function for sleep mode:
void stop_adc() { nrf_drv_timer_disable(&m_timer); nrf_drv_timer_uninit(&m_timer); nrf_drv_ppi_channel_disable(m_ppi_channel); nrf_drv_ppi_uninit(); // NRF_SAADC->TASKS_STOP = 1; nrf_drv_saadc_uninit(); } void sleep_mode_enter() { uint32_t err_code; NRF_LOG_INFO("Sleep mode Enter"); stop_adc(); err_code = app_uart_close(); APP_ERROR_CHECK(err_code); // NRF_LOG_INFO("UART close: %d", err_code); // stop_BLE(); } void startMeasuring_reading() { NRF_LOG_INFO("Measurement started"); int dataCounter=0; int flag = 0; int flag2 = -10; int flag3 = 0; int NextChannelCounter=0; int notificationConter = 0; int connectionflag = 0; uint8_t channel_number = -1; bool START_SENDING = false; uart_init(); saadc_sampling_event_init(); saadc_sampling_event_enable(); }
Also one another thing is i am trying to HIGH and LOW GPIOP0.23 and P0.29 but not able to HIGH this pin why it so. Is it any configuration for access GPIO of nRF52840 DK.
nrf_gpio_cfg_output(23);
nrf_gpio_pin_set(23); // High pin
Is the above code is correct please suggest me proper way or provide program snippet for the above both issues.
Thanks in advanced...