Other Parts Discussed in Thread: PGA460-Q1, ENERGIA, PGA460,
I seem to have an issue with what I think is the THR_CRC_ERR.
My hardware setup is as follows:
The BOOSTX:-PGA460 EVM attached over the MSP430F5529LP launchpad. The muRata transducer is mounted on a foam support.
To use the setup with the PGA460-Q1 EVM GUI provided by TI, I first upload the "boostxlpga460-firmware.bat" file. The setup works flawlessly. I usually program my own threshold values on the Device Setttings>>Threshold tab. Thus, the GUI shows the THR_CRC_ERR to be cleared.
When I attempt to use the same setup with the GetDistance Energia program (immediately after using it with the GUI with the GetDistance code uploaded), I have no issues. The settings I program through the serial monitor are as follows:
1. Communication Mode: 0=UART, 1=TCI, 2=OneWireUART ... 0
2. UART kBaud: 0=9.6, 1=19.2, 2=38.4, 3=57.6, 4=74.8, 5=115.2 ... 0
3. P1 and P2 Thresholds: 0=%25, 1=50%, or 2=75% of max ... 1
4. Transducer Settings: 0=Murata MA58MF14-7N, 1=Murata MA40H1S-R, x=Skip ... 0
5. TVG Range: 0=32-64dB, 1=46-78dB, 2=52-84dB, or 3=58-90dB, x=Skip ... 3
6. Fixed TVG Level: 0=%25, 1=50%, or 2=75% of max, x=Skip ... 1
7. Minimum Distance = 0.1m * BYTE ... 1
8. Run System Diagnostics?: 0=No, 1=Yes ... 1
9. Echo Data Dump: 0=None, 1=P1BL, 2=P2BL, 3=P1LO, 4=P2LO,... 1
10. Burn User EEPROM?: 0=No, 1=Yes ... 1
11. Command Cycle Delay: 10ms * BYTE ... 9
12. Number of Objects to Detect (1-8) = BYTE ... 1
13. UART Address of PGA460 (0-7) = BYTE ... 4
System Diagnostics displayed on serial monitor is as follows:
Configuring the PGA460 with the selected settings. Wait...
System Diagnostics - Frequency (kHz): 8.77
System Diagnostics - Decay Period (us): 1632.00
System Diagnostics - Die Temperature (C): 29.33
System Diagnostics - Noise Level: 4.00
EEPROM programmed successfully.
The values that display following this correspond pretty close to the expected distance values. And so everything works fine (as long as the procedure followed is as explained above).
The real issue starts when I disconnect and reconnect the setup (restarting the device through USB port power). The serial monitor shows everything going fine until user input part is over. After that, the System Diagnostics is shown as follows:
Configuring the PGA460 with the selected settings. Wait...
System Diagnostics - Frequency (kHz): 8.93
System Diagnostics - Decay Period (us): 560.00
System Diagnostics - Die Temperature (C): 28.00
System Diagnostics - Noise Level: 3.00
EEPROM programmed successfully.
I noticed a consistent Decay Period (us) difference between the two procedures. And the object distance shows a constant erroneous value of 5.98 m.
To get it back to work, I am required to cycle back to the first procedure of uploading the firmware using the GUI.
I also discovered that during this procedure, to quicken the process, on GUI restart (as it usually prompts after firmware upload) I only have to hit the All Mid-Code option on the Device Settings>>Threshold tab to clear the THR_CRC_ERR. After that, I then re upload the GetDistance code (WITHOUT DISCONNECTING the setup) and then it all works properly again with the right distance values being displayed. This leads me to believe that this behavior might be associated to the THR_CRC_ERR and the subsequent Px_THR_y threshold registers as that is the only thing that gets manipulated as I click on the All Mid-Code button on the GUI.
I need to be able to power down and power up the setup and obtain correct values after. I can only vaguely guess that the problem is to do with the Thresholds.