Part number: TMS320F28335PGFA
Hello All,
We have found an inexplicable correlation between writing a value to the divisor register of timer two and the reliability of writes to the XINTF at address 0x4211. Our system has a state machine mapped into the 0x42XX area of the XINTF. This is an interface to a number of A/D converters. Our technicians reported occasional lockups during calibrations of the devices. This is an automated, overnight procedure. When a device locks up, a day is lost.
The state machine locks up because it is waiting for a ready status from an A/D that is not present in this version of our device. It happens during the start of the acquisition, suggesting that the state machine was not being reset properly.
In order to keep the technicians progressing we added a software retry feature, which will restart the state machine if the calibration cycle does not finish in 28 seconds. To do this, we used timer two. What we found is that the retry never occurred. Further investigation revealed that if 28000 is written into the divider register at any time, whether we actually use timer two, or not, the problem appears to go away.
This is a very repeatable phenomenon. A number of units have displayed exactly the same behavior. If we do not write to the divisor we can induce a failure on the bench within 2 to 26 hours, starting a cal cycle every 20 seconds. If we write 28000 to the divisor during the boot of our device, we cannot induce a failure in a 72 hour test.
Here is a snippet of code...
Void main() {
:
:
:
StartMsTimer(28000L); // Function called at application start up, running out of RAM
:
// Background loop
while () {
} // End background while
} // End main
// Function definition
void StartMsTimer(unsigned long lTimeOut) {
unsigned long ticks;
ticks = lTimeOut * 150L;
*(volatile short *)0x0c13 = (ticks >> 16) & 0xffff; // hi
*(volatile short *)0x0c12 = ticks & 0xffff; // lo
}
We are having trouble understanding the relationship between timer two and the external interface.
Thanks.