This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using application timer causes hardfault in ble_app_uart (S120) ?

I've modified the ble_app_uart example by adding GPIOTE so that the transmitter sends a character to the receiver when a GPIO pin is toggled. This part is working well.

Then, I used the application timer to count the number of falling edges occurring in a GPIO pin. I followed the advice in this thread.

This counter worked well if the transmitter did not link with the receiver.

When the receiver was switched on and linked to the transmitter, the counter stopped working.

Is there any way to count the number of falling edge in a GPIO pin without using the application timer?

The transmitter code was based on the ble_app_uart example over S120.

Parents Reply
  • app_timer_start(..) will return error code NRF_ERROR_INVALID_STATE (0x08) either if timer_id == 0 or if the timeout handler is NULL. This can happen if app_timer_create(..) have not been called before app_timer_start(..) is called. You can try to call app_timer_create(..) before you initialize gpiote (gpiote_init()).

Children
No Data
Related