Hello,
I'm using nRF5 SDK with version 15 and nRF52832 IC. I want to sample some data with 3200Hz sampling rate. I can set the timer minimum 1ms Which means 1000Hz. How can I adjust the Timer for microSecond values.
Best Regards
Hello,
I'm using nRF5 SDK with version 15 and nRF52832 IC. I want to sample some data with 3200Hz sampling rate. I can set the timer minimum 1ms Which means 1000Hz. How can I adjust the Timer for microSecond values.
Best Regards
I can only share some parts of my code
void timer_led_event_handler(nrf_timer_event_t event_type, void* p_context) { switch (event_type) { case NRF_TIMER_EVENT_COMPARE0: { nrf_gpio_pin_toggle(17); } break; default: //Do nothing. break; } } static void TimerInit1(void) { nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG; err_code = nrf_drv_timer_init(&TIMER_LED, &timer_cfg, timer_led_event_handler); APP_ERROR_CHECK(err_code); time_ticks = nrf_drv_timer_ms_to_ticks(&TIMER_LED, time_ms); nrf_drv_timer_extended_compare(&TIMER_LED, NRF_TIMER_CC_CHANNEL0, time_ticks, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true); nrf_drv_timer_enable(&TIMER_LED); }
Are you using the soft device?
Yes, I am using the SoftDevice.
Well no ISR approach will work for you anyway when using the SD. As I pointed out above, you cannot do this with an ISR while using the SD. Please re-read my prior response.
Since you can only do it completely in hardware ie, ppi/gpiote there will not likely be an example specific to your needs. Also, you will have to give a lot more information about the source and type of data for anyone to help.
I want to sample some data with 3200Hz sampling rate from SPI interface. There is an accelerometer connected via SPI interface.
How do I need to configure the ppi ?