Post Go back to editing

Set T3LD Watchdog Register without T3CON

The ADUC7021x62 microcontroller is used in the project. and there was a crash problem. And it is solved when the line below is commented out.

The Code Line T3LD = 640;

Now it is written on the datasheet ` Bit 5 in the T3CON MMR must be set after writing to T3LD MMR. `

What would happen if the T3CON MMR register is not set even we write T3LD register? Does this explain why the device crashed is?

Parents
  • Can you clarify what you meant when the project crashed? Did it reset?

    The loaded value to the timer seems to be 0xFFFF when T3LD is commented out. The loaded 0xFFFF value could be one of the reasons why the project did not crash since the watchdog timer takes longer to count.

    The same result occurs when setting T3CON before T3LD. The value loaded to the timer is 0xFFFF. That's why the T3LD should be set before T3CON.

    If the T3CON is not set and you write a value to the T3LD register, there shouldn't be an issue that will cause the device to crash, but you need to set Bit 5 of T3CON to enable the watchdog timer.

Reply
  • Can you clarify what you meant when the project crashed? Did it reset?

    The loaded value to the timer seems to be 0xFFFF when T3LD is commented out. The loaded 0xFFFF value could be one of the reasons why the project did not crash since the watchdog timer takes longer to count.

    The same result occurs when setting T3CON before T3LD. The value loaded to the timer is 0xFFFF. That's why the T3LD should be set before T3CON.

    If the T3CON is not set and you write a value to the T3LD register, there shouldn't be an issue that will cause the device to crash, but you need to set Bit 5 of T3CON to enable the watchdog timer.

Children
No Data