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.
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.
Hello,
I am sorry, but I don't understand your question.
Are you asking what the frequency of the 16MHz clock is? Or are you asking how to set it to 1µS?
BR,
Edvin
Just looking to get the precise time of one tick of the timer when it is set to 16MHz. Is it truly 0.0625 us per tick ?
Yes it is. The accuracy depends on the HFXTAL that you are using. Look at the datasheet for the HFXTAL and look for a PPM rating.
Best regards,
Edvin
Yes it is. The accuracy depends on the HFXTAL that you are using. Look at the datasheet for the HFXTAL and look for a PPM rating.
Best regards,
Edvin
Does the BLE hog any time from the Hardware Timers on the nrf52832 chip? When scoping the timers, it seems there are longer and shorter pulses sometimes. Is there anyway to avoid this?
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