Other Parts Discussed in Thread: ENERGIA, PGA460, PGA460-Q1
Hello,
I am working on getting the BusDemo example sketch to work with two boards. I have followed the example video exactly, but the program only works sometimes, and if it does then it only works for the master board, despite identical setup procedures. When the distances are not correct they are the same repeating value, where the exact value repeated changes each time I start over by flashing the boards from the GUI.
The strangest part is that re-flashing the boards, applying the exact same EEPROM and other settings, then uploading the Energia sketch and choosing the exact same prompt options again might have different results. Where the previous, identical setup process might give me repeating values on both boards, the subsequent setup using identical settings will produce accurate and changing distances on the master board only. I have never gotten accurate or changing distance values on the second board.
I am using an external DC power supply in addition to the USB power, with the correct jumper setting for this standard configuration. The DC voltage is usually 14V but I have varied it between 10 and 18V for testing.
The 0-ohm resistor at R15 was NOT removed.
The power and ground pins both use the same references, and the IO, COM_S, and COM_P pins are directly connected between the boards. All wires were verified with continuity tests.
The following is my setup process, although I have tried altering all parts of it at some point to attempt to get it to work or help identify the issue, including but not limited to using the example values from the video instead of the ones I save to EEPROM from the GUI.
1) From GUI, flash one board, set up desired driving frequency, pulse count, current, TVG, and threshold settings.
2) Change from UART to OWU, selecting "No" during the prompt.
3) Set the UART address (0 for the master board, 1 for the other).
4) Click "Read All" from Memory Map and verify that the address and OWU settings are correct.
5) Save settings to EEPROM
6) Turn off DC power and remove USB.
7) Repeat the process for the other board using the same MSP430 launchpad. The only difference is the UART address.
8) Using the UART 0 board as master, reconnect power and the USB.
9) Open Energia, upload an unmodified version of the BusDemo example sketch.
Side note that might be relevant, the serial monitor will only sometimes display the prompts after a successful upload. Many times I have to upload it 2-3 times before it will display the prompts, even with the delay before printing changed to 5000 from 1000. Selecting 1, 0, x, s, or q does not continue to the next expected prompt or begin any measurement printing, even though the burst/listen light is blinking. The serial monitor is always opened before uploading the sketch. The baud rate is always 9600 for the serial monitor and correctly selected during the prompt.
10) Once I have set all the values (I have tried default values as well as skipping to only use EEPROM values where possible), I will always get distance values of some kind to display at the expected rate.
However, as stated before, the most I've been able to hope for is that the master board (I have tried using UART1 as master and selecting 2 devices with the same results) displays correct distances that change when moving a large object back and forth in front of the transducer.
Using the default values or my own custom values from EEPROM do not affect whether the program will display the correct distances from the master board. Both types of settings will successfully work for the one board sometimes.
As stated previously, identical setups from flashing the boards to configuring settings in the serial monitor will produce different results ranging from the master board only displaying correct distances to neither board displaying the correct or changing distances.
I do NOT receive distance values of 0 for either board for any tested setting combination.
I have tried multiple MSP430 launchpads, USB cables, and default closed-top transducers that came with the boards. I have not tried a different computer, but the single board examples such as GetDistance work perfectly every time on each board, although I still sometimes have to upload it multiple times before it will start printing to the serial monitor, even with an increased delay before printing.
I apologize for the wall of text, but I wanted to provide as much detail as possible since this is a weird issue to troubleshoot.
Thank you very much for any assistance!