Hi,
There is a bug in this function :
_pmuGetOverflow_
mrc p15, #0, r0, c9, c12, #3 ; read overflow
mov r1, #0
sub r1, r1, #1
mcr p15, #0, r1, c9, c12, #3 ; clear flags
bx lr
If the overflow occurs after the read but before the clear, the overflow is not seen by the caller.
The correct sequence to solve this problem is to use the read value to clear the overflow !
_pmuGetOverflow_
mrc p15, #0, r0, c9, c12, #3 ; read overflow
mcr p15, #0, r0, c9, c12, #3 ; clear flags
bx lr
Regards,
Bruno.