Hi,
I testing the GPIOTE using PPI.
I was assign GPIOTE to 0, 1, and 2 channel.
Can i priority set?
NRF_GPIO -> PIN_CNF[25] = 0x0C; //PIN INPUT PULL UP NRF_GPIO -> PIN_CNF[26] = 0x0C; //PIN INPUT PULL UP NRF_GPIO -> PIN_CNF[28] = 0x0C; //PIN INPUT PULL UP //NRF_GPIO -> PIN_CNF[28] = 0x04; //PIN INPUT PULL DOWN //------------------------------------------------------------------------------ //Interrupt Set NRF_GPIOTE -> INTENSET = 0x00000007; //IN[0] Set, Enable => Write '1' to Enable interrupt for IN[0] event, Interrupt 0, 1, 2 NRF_PPI -> CHENSET = 7; //CH0 Enable and Set //Touch Interrupt -------------------------------------------------------------------------------- NRF_GPIOTE -> CONFIG[0] = 0x00021901; //configuration of IN[0], Mode = Event, Pin 25, Falling edge //NRF_GPIOTE -> CONFIG[0] = 0x00011901; //configuration of IN[0], Mode = Event, Pin 25, Rising edge NRF_GPIOTE -> TASKS_SET[0] = 0x01; //TASKS 0 set //PPI Set NRF_PPI -> TASKS_CHG[0].EN; //Enable channel group //NRF_PPI -> CHEN = 1; //CH0 Enable //NRF_PPI -> CHENSET = 7; //CH0 Enable and Set NRF_PPI -> CH[0].EEP = NRF_GPIOTE -> EVENTS_IN[0]; //EVENTS_IN[0]; 0x001, NRF_PPI -> CH[0].TEP = NRF_GPIOTE -> TASKS_SET[0]; //0x000 NRF_PPI -> FORK[0].TEP = NRF_GPIOTE -> TASKS_SET[0]; //0x000 NRF_GPIOTE -> CONFIG[1] = 0x00021A01; //configuration of IN[0], Mode = Event, Pin 26, Falling edge //NRF_GPIOTE -> CONFIG[1] = 0x00011A01; //configuration of IN[0], Mode = Event, Pin 26, Rising edge NRF_GPIOTE -> TASKS_SET[1] = 0x01; //TASKS 0 set //PPI Set NRF_PPI -> TASKS_CHG[1].EN; //Enable channel group //NRF_PPI -> CHEN = 2; //CH1 Enable //NRF_PPI -> CHENSET = 7; //CH1 Enable and Set NRF_PPI -> CH[1].EEP = NRF_GPIOTE -> EVENTS_IN[1]; //EVENTS_IN[1]; 0x001, NRF_PPI -> CH[1].TEP = NRF_GPIOTE -> TASKS_SET[1]; //0x000 NRF_PPI -> FORK[1].TEP = NRF_GPIOTE -> TASKS_SET[1]; //0x000 //--------------------------------------------------------------------------------------------- //AFE4900 Interrupt -------------------------------------------------------------------------------- NRF_GPIOTE -> CONFIG[2] = 0x00021C01; //configuration of IN[0], Mode = Event, Pin 28, Falling edge //NRF_GPIOTE -> CONFIG[2] = 0x00011C01; //configuration of IN[0], Mode = Event, Pin 28, Rising edge NRF_GPIOTE -> TASKS_SET[2] = 0x01; //TASKS 2 set //PPI Set NRF_PPI -> TASKS_CHG[2].EN; //Enable channel group //NRF_PPI -> CHEN = 4; //CH0 Enable //NRF_PPI -> CHENSET = 7; //CH0 Enable and Set NRF_PPI -> CH[2].EEP = NRF_GPIOTE -> EVENTS_IN[2]; //EVENTS_IN[0]; 0x001, NRF_PPI -> CH[2].TEP = NRF_GPIOTE -> TASKS_SET[2]; //0x000 NRF_PPI -> FORK[2].TEP = NRF_GPIOTE -> TASKS_SET[2]; //0x000 //------------------------------------------------------------------------------ NVIC_EnableIRQ(GPIOTE_IRQn);