Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Reading a register right after writing to it. Why?

Hi!

I have found the following piece of code on an example from a Nordic employee. I'm curious as to its purpose.

NRF_TIMER0->EVENTS_COMPARE[0] = 0;
(void)NRF_TIMER0->EVENTS_COMPARE[0];

Why is the register set, and then read just after?

Thanks

Parents Reply Children
No Data
Related