Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5288

SDK • Re: RP2350: systick gotcha - FYI

$
0
0
interesting; yeah; i mean the code is slightly bogus, since it sets the counter to zero, then reads it back expecting it to be non-zero, but the reset to value other than zero only happens on the next systick clock cycle. Therefore the code doesn't work in general if you are counting anything slower than processor clock cycles, and then you are getting bitten by the M33 being two damn quick, and the first read happening on the very next clock cycle, while the value is still zero.

edit: note to be clear, this isn't an issue with volatile

Statistics: Posted by kilograham — Sat Aug 31, 2024 9:39 pm



Viewing all articles
Browse latest Browse all 5288

Trending Articles