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.

PGA460: OWU communication mode

Part Number: PGA460
Other Parts Discussed in Thread: , , ENERGIA, TIDA-01597, SN65HVDA100-Q1, TEST

Hello,

Our customer used  OWU communication to control the PGA460, he wants to transfer data to the PC via the serial port, but the serial port always shows error : Did not receive measurement results!

And this program was available before.

Best regards

Kailyn 

  • Hello Kailyn,

    Thank you for your question.

    Is the customer using the PGA460 EVM for evaluation, or is this a standalone device?

    Has the customer able to communicate any data using OWU?

    Do you have the register settings used by the customer PGA460 device?

    Thank you,

    Jacob

  • Hi Jacob,

    Thank you for your reply.

    Below is the register configuration:

    USER_DATA1 = 0x00;
    USER_DATA2 = 0x00;
    USER_DATA3 = 0x00;
    USER_DATA4 = 0x00;
    USER_DATA5 = 0x00;
    USER_DATA6 = 0x00;
    USER_DATA7 = 0x00;
    USER_DATA8 = 0x00;
    USER_DATA9 = 0x00;
    USER_DATA10 = 0x00;
    USER_DATA11 = 0x00;
    USER_DATA12 = 0x00;
    USER_DATA13 = 0x00;
    USER_DATA14 = 0x00;
    USER_DATA15 = 0x00;
    USER_DATA16 = 0x00;
    USER_DATA17 = 0x00;
    USER_DATA18 = 0x00;
    USER_DATA19 = 0x00;
    USER_DATA20 = 0x00;
    TVGAIN0 = 0xAA;
    TVGAIN1 = 0xAA;
    TVGAIN2 = 0xAA;
    TVGAIN3 = 0x82;
    TVGAIN4 = 0x08;
    TVGAIN5 = 0x20;
    TVGAIN6 = 0x80;
    INIT_GAIN = 0x60;
    FREQUENCY = 0x8F;
    DEADTIME = 0x09;
    if (comm == 2)
    {
    PULSE_P1 = 0xA0 | 0x04;
    }
    /*else
    {
    PULSE_P1 = 0x04;
    }*/
    PULSE_P2 = 0x10;
    CURR_LIM_P1 = 0x55;
    CURR_LIM_P2 = 0x55;
    REC_LENGTH = 0x19;
    FREQ_DIAG = 0x33;
    SAT_FDIAG_TH = 0xFE;
    FVOLT_DEC = 0x7C;
    DECPL_TEMP = 0x4F;
    DSP_SCALE = 0x00;
    TEMP_TRIM = 0x00;
    P1_GAIN_CTRL = 0x09;
    P2_GAIN_CTRL = 0x09;

    Best regards

    Kailyn 

  • Hello Kailyn,

    Thank you for the register settings.

    It does not appear the customer has enabled the OWU interface for the PGA460 device. The setting is under the PULSE_P1 register, and involves writing a logical 1 to bit 7 of the register.

    Below is a table of the Pulse_P1 register allocation:

    Further information on OWU can be found in section 7.3.6.2.2 of the PGA460 datasheet:

    Please let me know if you have any questions.

    Thank you,

    Jacob

  • Hi Jacob,

    He has tried to configure PULSE_P1 

    if (comm == 2) 

    PULSE_P1 = 0x80 | 0x04;

    But the problem is still exist.

    Best regards

    Kailyn 

  • Hi Kailyn,

    Can you also provide more info on if they are using the BOOSTXL-PGA460 EVM, the PGA460PSM-EVM, or a custom board?

    Thank you,

    Mekre

  • Hi Mekre,

    Thank you for your reply, the customer used his own board and according to the OWI of TIDA-01597 design, and he used the procedure is :getdisance of energia. 

    Best regards

    Kailyn 

  • Hello Kailyn, 

    Thank you for the additional information.

    Has the customer been able to probe the communication line to verify the device is sending and receiving data over OWU?

    Additionally, is the customer using a transceiver like the SN65HVDA100-Q1 between the microcontroller and the PGA460?

    Thank you,

    Jacob

  • Hi Jacob,

    Yes , he has use the transceiver SN65HVDA100-Q1. And below is his schematic:

    Best regards

    kailyn 

  • Hi Kailyn, thank you for the schematic. I see a few differences between the TI recommendation and the customer board. Can you please confirm with the customer to understand if the schematic is accurate to how they designed the boards. 

    1. RX and TX pins have different net designators between the TI design and their design

    2. Diode connected to jumper appears to be backwards compared to TI schematic:

    Please let me know if these changes were intentional by the customer. 

    Thank you,

    Jacob

  • Hi Jacob,

    Thank you very much, the TXD and RXD  connected correctly with MCU, and the diode is indeed connected opposite. He has put the diode correctly according to the TI schematic. Now he doubted the problem is due to the procedure, he used BOOTXL-PGA460 before and now he used his own board and didn't change the procedure. He used the getdisance  of energia, and also used busdemo of energia. Both of them appeared ERROR - Did not receive measurement results!。

    Best regards

    kailyn

  • Hello Kailyn, 

    Can you verify that the OWU communication is working as intended on his own board? 

    Best Regards, 

    Justin Beigel

  • Hi Justin,

    His own board appeared  “ERROR - Did not receive measurement results! ” when used his own board。

    Best regards

    Kailyn

  • Hi Kailyn,

    Please ask the customer to test if register settings can be read back or written via OWU. 

    I need to determine if the issue is communication related or TOF related. 

    Thank you,

    Jacob

  • Hi Jacob,

    Below his code with register setting, but the read back value is always zero.

    byte pga460::registerRead(byte addr)
    {
    byte data = 0x00;
    byte temp = 0;

    if (comm == 2)
    {
    owuShift = 1; // OWU receive buffer offset to ignore transmitted data
    }
    else
    {
    owuShift = 0;
    }

    pga460SerialFlush();

    regAddr = addr;
    byte buf9[4] = {syncByte, SRR, regAddr, calcChecksum(SRR)};
    if (comm == 0 || comm == 2) // UART or OWU mode
    {
    Serial1.write(buf9, sizeof(buf9));
    }
    if (comm == 3) // SPI mode
    {
    spiTransfer(buf9, sizeof(buf9));
    }
    delay(10);
    if (comm == 0 || comm == 2) // UART or OWU mode
    {
    for(int n=0; n<3; n++)
    {
    if(n==1-owuShift)
    {
    Serial1.write(buf9, sizeof(buf9));
    //data = Serial1.read(); // store read data
    }
    /* else
    {
    temp = Serial1.read();
    }*/
    }
    }
    if (comm == 3) // SPI mode
    {
    spiMosiIdle(3);
    data = misoBuf[1];
    }

    return data;
    }

    在energia代码:

    Serial.begin(19200);
    ussc.initBoostXLPGA460(2,19200,0);

    }
    void loop() {
    // put your main code here, to run repeatedly:
    ussc.registerWrite(0x14, 0xAF);
    ussc.registerWrite(0x15, 0xFF);
    ussc.registerWrite(0x16, 0xFF);
    ussc.registerWrite(0x17, 0x2D);
    ussc.registerWrite(0x18, 0x68);
    ussc.registerWrite(0x19, 0x36);
    ussc.registerWrite(0x1A, 0xFC);
    ussc.registerWrite(0x1B, 0xC0);
    ussc.registerWrite(0x1C, 0x8C);
    ussc.registerWrite(0x1D, 0x00);
    ussc.registerWrite(0x1F, 0x12);
    ussc.registerWrite(0x1E, 0x01);
    ussc.registerWrite(0x14, 0xAF);
    ussc.registerWrite(0x15, 0xFF);
    ussc.registerWrite(0x16, 0xFF);
    ussc.registerWrite(0x17, 0x2D);
    ussc.registerWrite(0x18, 0x68);
    ussc.registerWrite(0x19, 0x36);
    ussc.registerWrite(0x1A, 0xFC);
    ussc.registerWrite(0x1B, 0xC0);
    ussc.registerWrite(0x1C, 0x8C);
    ussc.registerWrite(0x1D, 0x00);
    ussc.registerWrite(0x1F, 0x12);
    ussc.registerWrite(0x1E, 0x01);
    Serial.print("TVGAINO:");
    Serial.print(ussc.registerRead(0x14),HEX);

    Best regards

    Kailyn 

  • Hi Kailyn,

    Thank you for the code.

    Can you ask the customer to use an oscilloscope or logic analyzer to capture the OWU communication line during use?

    I need to determine if the communication protocol is being executed properly.

    Thank you,

    Jacob