This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BOOSTXL-PGA460: PGA460 UART Communication with Pi

Part Number: BOOSTXL-PGA460
Other Parts Discussed in Thread: ENERGIA, PGA460

Tool/software:

Hello TI,

We were initially using PGA450, but now we selected PGA460 for our distance measurement application. We are trying to interface PGA460 with Pi4 over UART. We have ported the Energia library to be compatible with Ubuntu OS.

We are getting response from PGA460, but it seems reception is incorrect. Also, distance is not changing and we are always getting constant value.

I have the following queries:

  • I wanted to ask if there is any way to check the correctness of UART communication with PGA460 similar to Comman 0 which is used to test PGA450 UART communication.
  • As we ordered PGA460 BOOSTXL Evm for initial evaluation, is it necessary to flash it before getting started?
  • In our custom board, we will use PGA460, do we have to flash / update firmware before we can use it?

Would be waiting for the response.

Thanks & Best Regards,

  • Hello Taimur,

    Thanks for posting to the sensors forum! 

    1. I wanted to ask if there is any way to check the correctness of UART communication with PGA460 similar to Command 0 which is used to test PGA450 UART communication.
      1. There is no command 0 on the PGA460 to test the communication but you can use other commands that return data to ensure the device is receiving the correct command and transmitting back. For example you could run a command 8 which is a system diagnostics this should produce 2 bytes of data if the device is not returning data then it can be assumed that the UART is not functional if or run a command 13,TVG bulk read, this should produce 7 bytes of data from the PGA460. 
    2. As we ordered PGA460 BOOSTXL Evm for initial evaluation, is it necessary to flash it before getting started?
      1. The PGA460 does not need to be flashed, but the microcontroller that interfaces with the GUI does need to be flashed. Please make sure to order an MSP-EXP430F5529LP to use with the online GUI.
    3. In our custom board, we will use PGA460, do we have to flash / update firmware before we can use it?
      1. The PGA460 does not need to be flashed or updated in firmware for usage. You can however save data into the EEPROM registers of the device, so whenever the device is powered up some of the settings can be restored from the EEPROM or you can also store other information in the USER_DATAx registers.

    I hope this helps!

    Best,

    Isaac

  • Hello Isaac,

    Thanks for your reply. We are trying to interface PGA460 with Pi4 over UART. Unfortunately, we are not getting back any response from the sensor, even though from Pi commands are being properly sent. Is there any code example from TI for interfacing of PGA460 with Raspberry Pi?

    Many Thanks!

  • Hello Taimur, 

    Unfortunately we don't have any Raspberry Pi code for the PGA460. If you provide a logic analyzer capture of your communication perhaps I can identify what is wrong and why the sensor is not responding. 

    Best,

    Isaac

  • Hi Isaac,

    Here is the logic analyzer capture. This waveform is captured when interfacing Pi with PGA450. There is no response from the sensor. Ch0 is Pi Rx and Ch1 is Pi Tx.

    .

    In this below capture, when we interface PGA450 with an Arduino, we are getting the expected response. Ch0 is Arduino Tx and Ch1 is Arduino Rx.

    Eventhough both Tx signals are exact same, not sure why there is no response from sensor when interfaced with Pi.

  • Hello Taimur,

    Thanks for the captures. Some questions on my end:

    1. Just to confirm was this ran on the PGA460 or the PGA450? Both instances above mention PGA450 so I just want to make sure this is the right device for both instances.
    2. Another question was for the Pi capture there is a blip in the Ch0 Pi RX where the signal drops low. Is this happening during every measurement?
    3. Can you confirm what the baud rate is for the UART?

    Best,

    Isaac

  • Hi Isaac, Those waveforms are from PGA450. I am getting the expected response.

    Now I try to interface PGA460. You mentioned earlier Command8 and Command13. Could you please tell where I can find these commands and what to expect in response?

    Best Regards,
    Taimur

  • Hi Taimur,

    Isaac is currently out of office today. He should be back on Monday and should be able to provide you with a response early next week.

    In the meantime, would you be able to share waveforms of your commutation attempts to the PGA460?

    Please see below (from Table 7-3 in the datasheet) for more information regarding Command8 and Command13:

      See section 7.3.5 System Diagnostics for more information.

    Best,

    ~Alicia

  • Hi Alicia,
    Thanks for your reply. Unfortunately I don't have waveforms right now, but what ever command I am sending, I am getting back this 8 bytes of data:

    I was going through this thread, and expecting 0x40 0x6B 0xA0 in response to command 6.

    Best,

    Taimur

  • Also in what sequence we communicate with PGA460 over UART? Do we have to configure it in the beginning? Any specific command to send?

  • Hello Taimur,

    If you are using the UART pins then UART will be active at powerup. The information on the thread is to activate UART on the IO pin that can be used for TCI or one-wire UART, this by default does not come enabled and the user did not have access to the UART pins to program the device into one-wire UART.

    The device will pull data from EEPROM at power up so if that information is correct you should be good, but the thresholds need to be programmed everytime the device is powered up as this is not saved.

    In order to run command 6 make sure that you run a burst and listen command first or else the data may not make sense. There is also a lot of data being returned to the device in the capture shown above, this is more than what you should be expecting for this specific command. When running a command 6 this is what I was seeing on my system.

    Best,

    Isaac

  • Hi Isaac,
    How to make sure UART communication is correct? Is there any specific command and corresponding response to that command? 

    Thanks

  • Hello Taimur,

    Maybe a simple method would be to command the device to perform a burst and monitor the output lines. If you see the burst emit then you can confirm that the UART communication worked.

    Best,

    Isaac