Other Parts Discussed in Thread: ENERGIA, TDC7201
Tool/software: Code Composer Studio
Hi,
I am trying to run this evaluation board in Energia on a TM4C129EXL board.
I managed to read out in the rolling mode the configuration registers with the expected values.
However, when I try setting the START_MEAS bit in the TDCx_CONFIG1 register, I read it back as all 0s, and the timing registers 10h to 1Ch are all set to 0 (I am pulsing on of the TDCs with repeating pulses spaced by 12ns).
Have I neglected a step in preparation for measurement? Why am I not getting any data back in the timing registers?
Attached is my code
//Writing a new measurment into TDC config register 1
SPI.transfer(B01000000);
SPI.transfer(1); //I hope I got the bit order correct. This should enable a measurement
//delay(1);
valReturn=SPI.transfer(0);
Serial.print(valReturn, HEX);
Serial.print("\n\n");
valReturn=SPI.transfer(B10000000 && 0x10);
Serial.print("Reading timing register\n");
for (int i=1;i<40;i++)
{
valReturn=SPI.transfer(0);
Serial.print(valReturn, HEX);
if (!(i%3)) Serial.print("\n");
}
SPI.end();
Serial.end();
And the output...
Connected
0
Reading timing register
000
000
000
000
000
000
000
000
000
000
000
000
000