All,
I was handed over an old code makes use of bit data types, registers and bit variables. This code base makes extensive use of bit variables. Recently, I came across a suspected bug in this code base. I traced this issue back to one of the bits in register. The bit sets (instead of clearing) upon power cycle causing this issue to occur. At-least, that what I am suspecting. It is pretty repeatable across other devices, old and new. I am using standard hi-tech compiler version 9.50. Reading through user manual, section 3.4.2 and 3.4.3, I am not able to find exact root cause. Why that particular bit? Why only in power up?Is there a particular way of handling these registers and bit during code compilation? Do you normally specify a memory location during compilation?
Regards,
Tarun S