Michelle Keimig

Switching from Input capture to overflow on 9S08AW60 timer problem

Discussion created by Michelle Keimig on Aug 30, 2007
Latest reply on Aug 30, 2007 by Michelle Keimig
Hello!
I'm currently using the AW60 demo board.  I'm configuring this for LIN.  Currently running at 2400 for troubleshooting purposes.  Eventually to be run at 19.2k.  I have ported the example code from AN2503/D Slave LIN Driver for the QT/QY Family to the AW60.  
 
I have connected my transceiver up to a master node simulator I have used in the past.  The code makes it through the SYNCH correctly.  But at this point it will not read the ID correctly.  I'm using TPM1CH0.  It is switched between input capture mode and overflow mode.  Both are set to interrupt. 
 
For Break recognition, it is set to input capture and then switched to overflow mode to count the bit times.  Then the timer is set back to input capture for the synch process.  Once the start bit of the ID is captured, the timer is then set back to overflow. 
 
And here is where my problem is.  During the switching between input capture and overflow previous to this in the code, the transition has happened quickly and appropriately.  However, when the switch to overflow for reading the ID occurs, it takes about 7ms or more for the FIRST overflow to actually occur.  Which of course means I have lost my ID and only read 0xFF.  The bit times for overflow are the same from the break recognition.  And after that first overflow, the overflow timing stays correct for the baud rate.
 
I have not been able to find anything that is holding my code up.  If I use the P&E Multilink emulator, the code simply steps back to my main function (which only moves one buffer to another) after setting the timing correctly for the overflow.  It just doesn't happen for a long, long time.
 
Any suggestions?  I'm stuck.
 
thanks,

Outcomes