Hi
I would like to ask you for advice on how to solve my problem with Ble and the timer I have nRf52840 and I am trying to add a timer to examples\ble_peripheral\ble_app_uart timer works properly unless advertising_start(); and then the timer conflict with Ble begins. Does anyone have a solution to this problem ? I am adding part of the timer code and also photos where to see my problem.
#define GPIO_24 NRF_GPIO_PIN_MAP(0,24)
void timer_init(void)
{
NRF_TIMER2->TASKS_STOP = 1;
NRF_TIMER2->SHORTS = (TIMER_SHORTS_COMPARE0_CLEAR_Enabled << TIMER_SHORTS_COMPARE0_CLEAR_Pos);
NRF_TIMER2->MODE = TIMER_MODE_MODE_Timer;
NRF_TIMER2->BITMODE = (TIMER_BITMODE_BITMODE_24Bit << TIMER_BITMODE_BITMODE_Pos);
NRF_TIMER2->PRESCALER = 1;
NRF_TIMER2->INTENSET = (TIMER_INTENSET_COMPARE0_Set << TIMER_INTENSET_COMPARE0_Pos);
NRF_TIMER2->CC[0] = 100;
NRF_TIMER2->TASKS_START = 1;
NVIC_EnableIRQ(TIMER2_IRQn);
}
void TIMER2_IRQHandler(void)
{
if (NRF_TIMER2->EVENTS_COMPARE[0])
{
nrf_gpio_pin_toggle(GPIO_24);
NRF_TIMER2->EVENTS_COMPARE[0] = 0;
}
}
not start advertising

start advertising


