Using UARTE1 as event line

I am interfacing nRF to a GPRS modem. In order to ensure the modem is in a known state I do a power cycle of the modem and I determine completion by monitoring the TX line from the modem using the UARTE1 RX. When the modem powers down the modem TX line goes low, and when the modem completes it power up the modem TX line goes high ready to act as UART.

I would like to detect the change from low to high in the modem TX line as an event through the UARTE1 line before enabling as a uart.

I can monitor the change successfully by polling the UARTE1 RX line, but I am trying to make this as an event.

I have followed the example for the on board switch of the dongle, which functions.

I have as code

#define UARTE1_RX_PIN 17    /* (P0.17) */

#define POWER_ON_PIN    UARTE1_RX_PIN    /* (P0.17)*/

                        nrf_drv_gpiote_in_config_t in_config = NRFX_GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);
                        err_code = nrf_drv_gpiote_in_init(POWER_ON_PIN, &in_config, gprsTurnOnTxHighHandler);
                        APP_ERROR_CHECK(err_code);
                        nrf_drv_gpiote_in_event_enable(POWER_ON_PIN,true);

However I never see an interrupt

I am using SDK16.0

Parents Reply Children
Related