
Hi<
Hi,
according to datasheet for the register TimerXControl we are supposed to not modify the bits [31:8] and [4] so we are suppose to read the register and modify only
the others registers/register/bits/
Does this mean i need to resend the earlier patch. Writing 00 to these bits ( 31:8 & 4) is undefined.
Generally, in ARM terminology, one should avoid writing
values where writing a value or bit is undefined.
Not only in ARM.
"Undefined" implies, not that there is no result, but that
the outcome is not defined by the specification.
Hence it is good practice to read/change/write registers with undefined bits, or bits where writing is undefined.
That exaclty what I mean
This is especially important with bits defined as such in ARM TRMs since different ARM customers may implement the ARM IP in different ways i.e writing a value to such bits may have different results in different implementations and or versions of the hardware.
Thanks Peter for the clarification,
I checked the source code & found that the original code itself modifies the Timer Control Register directly.
Also, after going through the Timer Module i found that,
For free-running Mode of the timer, Writing to Timer_Load register has no effect.
The TRM Says,
"If the timer is operating in Free-Running Mode, it continues to decrement from its maximum value"
So i think the writing to timer_load register is also unnecessary in this case.
Kindly correct me if i am wrong.
Also Kindly let me know, if i need to change anything in the patch. Else i resend the patch once again
regards Gururaja