• Answer Suggested

PGA460: PGA460 is not responding with ESP arduino

Part Number: PGA460

Hi,

We are using PGA460 with ESP32  arduino for ultasonic sensor control.

We are able to send the data from ESP32 to PGA460, but unable to receive the acknowledgement from PGA.

Kindly let us know the solution.

  • Padmaraj,
    If you are not receiving data from the PGA460-Q1 your master-transmit command data/structure is likely incorrect.
    Are you using UART? Are you using the PGA460 Energia library and example as a reference? If so, can you send me an example of the command sequence transmitted from the master?

    For instance:
    An example of a Preset 2 Burst & Listen of 3 objects for UART address 0 would be:
    0x55, 0x01, 0x03, 0xFB
    where 0x55 is the sync byte
    0x01 is the UART address and command #
    0x03 is the number of objects to detect
    0xFB is the UART checksum

    Please provide your example in the same format.

    What command(s) are you sending and not receiving a response for? Not all commands automatically prompt the PGA460 to provide a response.
    Akeem Whitehead
    Texas Instruments // ASC-SENSING-SSC // Applications Engineer
  • In reply to Akeem Whitehead:

    Hi sir,

    Thank you for your reply.

    We are using UART  2 from esspressif. Data sending is alright, checked in serial  terminal window.

    An example of writing threshold for UART address is:

    0x55, 0x50 , data0 , data1..........0x35(checksum).

    But while in threshold bulk read address to UART 2 is:

    0x55, 0x4F,0xBO

    I am not able to read proper threshold data's , and I m getting only 0xFF........

    Is the  command is right for UART2 address?

  • In reply to padmaraj Chipre:

    Hi Padmaraj,

    If I understand correctly, you are trying to execute a threshold bulk read command 15 on PGA460 UART_ADDR 2.

    You are sending the correct UART sequence for this particular command: 0x55, 0x4F, 0xB0

    Have you confirmed that your master is using a baud rate between 9.6-115.2kBaud, 8 data bits, 2 stop bits, no parity, and no flow control?

    Are you certain the TXD of the master is connected to the RXD of the PGA460, and vice-versa?

    Are you able to get any response from the PGA460? The default address is '0', so try sending 0x55, 0x0F, 0xF0 instead for the same command.

    Akeem Whitehead
    Texas Instruments // ASC-SENSING-SSC // Applications Engineer
  • In reply to Akeem Whitehead:

    Hi Akeem,

    On ESP32, PGA460Q1 does not respond on UART1 OR UART2 (we cannot allocate UART0 since its already utilized) and the PGA460 code provided by TI is not able to Read the 128 bytes Transducer data dump on UART2. It seems that between the two functions of "runEchoDataDump" and "pullEchoDataDump" the code is somehow not able to set / get the result on UART2. UART0 works on the PGA460 EVM though there is no way to test UART1.I have checked UART2 works independently.
  • In reply to Akeem Whitehead:

    Hello Akeem,

    As per your suggestion, we tried with UART0 of ESP arduino it is working fine, but we cannot use UART0 as it is already occupied.

    We already designed for UART2 instead of UART0 to PGA460. We are unable get respond from PGA over UART2.

    Please let us know what we need to change in our code to get it work.

    Kindly requesting you to reply for our query asap. we require it to be done immediately.

  • In reply to padmaraj Chipre:

    Hi padmaraj,
    Just to clarify, the UART_ADDR of the PGA460 is not related to the UART channel # of the master. So when using UART2 on your ESP Arduino, you still communicate to the default PGA460 UART_ADDR '0'. If your UART0 channel is working, UART2 must be leveraged identically (don't change the code). As far as the PGA460 is concerned, the Arduino UART channels could be labeled UART-A and UART-B, or UART-Red or UART-Blue.

    Have you attempted to communicate to PGA460 UART address '0' using UART2?
    Akeem Whitehead
    Texas Instruments // ASC-SENSING-SSC // Applications Engineer
  • In reply to Akeem Whitehead:

    Hi Akeem,

    I attempted to communicate to PGA460 UART address '0' using UART2, but with UART 2 of ESP it is not working.

    I am able to get result with UART0 with junk ( as I am using same UART for dumping and to print ) but not with UART2.

    Below is the log,

    Configuring the PGA460 with the selected settings. Wait...
    ERROR - Did not receive data!
    System Diagnostics - Frequency (kHz): inf
    System Diagnostics - Decay Period (us): 0.00
    ERROR - Did not receive data!
    System Diagnostics - Temperature (C): -42.67
    ERROR - Did not receive data!
    System Diagnostics - Noise Level: 0.00
    Retrieving echo data dump profile. Wait...
    255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,2
    55,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,25
    5,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
    ,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
    255,255,255,
    EEPROM programmed successfully.
    ERROR - Did not receive data!
    ERROR - Did not receive data!
    Error reading measurement results...

    Kindly requesting you to reply asap.

  • In reply to padmaraj Chipre:

    Are you using version 1.0.2 of the Energia library? This will ensure you are using the latest version of code, which offers several bug fixes and improvements to the library. Your output snipped is similar to the older version.

    When using UART2, are you updating the PGA460_USSC.cpp file to use UART2 of your ESP? The library is hard-coded to only enable Serial1 for the UART communication to the PGA460 device.

    You'd need to initiate and update any instance of Serial1. ... to Serial2. (or the equivalent call to the ESP's UART2 port).
    Akeem Whitehead
    Texas Instruments // ASC-SENSING-SSC // Applications Engineer
  • In reply to Akeem Whitehead:

    Hello Akeem,

    We are using latest version of PGA code.

    While using UART2, i am updating .cpp file too, but still it is not working.

    One more thing we discovered is after 2 minutes it gives some random data.

    Please suggest something to get it work. We are struggling since many days.

  • In reply to padmaraj Chipre:

    Hello Akeem,

    Kindly requesting you to reply asap, as we want this to be work soon. We are already into production, but got stuck because of this UART issue.

    Please revert back us.