TIMER 1 Instance us per tick

Is there a way to see the exact time it takes for one tick when setting up a system timer? Obviously 1/16MHz is 0.0625 us which is how I have it set up, but I need this duration to be exact.

Parents Reply Children
  • I am not sure exactly what you are doing. The BLE stack hogs CPU time with a very high interrupt priority, so if you are toggling a pin in an interrupt, this may get delayed some times when the BLE stack is running. Perhaps this is what you are seeing?

    In that case, you need to use something called PPI to hook a specific event to a task. In that case you can tie a TIMER event to a GPIO toggle task.

    Based on your DevZone history, it looks like you are using the nRF5 SDK. In that case, the SoftDevice (BLE stack) will take over TIMER0, so you can't use TIMER0 (or RTC0) in your application.

    Best regards,

    Edvin

Related