Issue with NRF_TWIM_TASK_STOP and NRF_TWIM_EVENT_STOPPED on NRF52833 DK

Issue:

While trying to initialize and check the viability of an I2C interface using TWIM, my NRF_TWIM_TASK_STOP never triggers NRF_TWIM_EVENT_STOPPED.

Code:

nrf_twim_task_trigger(reg, NRF_TWIM_TASK_STOP);
while (nrf_twim_event_check(reg, NRF_TWIM_EVENT_STOPPED) == 0) {
    printf("IN WHILE WAITING FOR (NRF_TWIM_EVENT_STOPPED == 1)\n");
}

This causes the "IN WHILE" message to print indefinitely.

Wondering how I can verify that the trigger is being pushed to the correct address, and diagnose why the event is not getting fired.

Cheers!

Parents
  • Update:

    Having run some rather exhaustive tests, I have the following update

    1) Triggering the NRF_TWIM_TASK_STOP event using nrf_twim_task_trigger causes an NRFX_ERROR_INTERNAL error. I can get no further information.
    2) Calling nrfx_twi_bus_recover succeeds, and the bus is recovered.

    This allows my method to return a proper TWI interface using the discovered address.

    Questions:
    1) What kinds of issues would produce the aforementioned error code?
    2) Is there any way to get further/deeper information on the error?

    Best,


    S.

Reply
  • Update:

    Having run some rather exhaustive tests, I have the following update

    1) Triggering the NRF_TWIM_TASK_STOP event using nrf_twim_task_trigger causes an NRFX_ERROR_INTERNAL error. I can get no further information.
    2) Calling nrfx_twi_bus_recover succeeds, and the bus is recovered.

    This allows my method to return a proper TWI interface using the discovered address.

    Questions:
    1) What kinds of issues would produce the aforementioned error code?
    2) Is there any way to get further/deeper information on the error?

    Best,


    S.

Children
Related