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: URM got back 0XFF

Part Number: PGA460

Hi

I am using uart interface between MCU and PGA, I set preset 1 and sending  UMR command to get distance measurement response, but PGA response the  buffer as 0xFF, below in image is measurement in UART communication, D2 is MCU command and D4 is PGA response.

Thank you

  • Hello Ricardo,

    Let me check with my team internally and I will get back to you on Wednesday.

    Thank you,

    Daniel Balmaceda

  • Hello Ricardo,

    The reason why you are receiving 0xFF from the UMR command is because there was no echo detected. There are a couple of reasons why this echo was not detected:

    - The threshold configuration was not setup correctly

    - A signal was not produced

    In most instances, the threshold is not configured directly so you may need to start with that. Are you using the GUI or are you trying to configure the device without any GUI assistance? The reason I am asking is because it's easier to visualize how the thresholds are placed in time on the GUI, making setup much easier.

    Thank you,
    Daniel Balmaceda

  • Hi Daniel,

    Thanks for the answer.

    Yes, I'm using the GUI and I noticed that after adjusting the parameters, I still got errors in return. so I did a reverse analysis on the GUI protocol. And I verified that I was sending the wrong order of packages, it sent this:


    pga460_write_register(uart, EE_CNTRL_ADDR, 0x80);

    pga460_ultrasonic_cmd(uart, presset, obj); 

    delayms(45);
    pga460_send_comand(uart, UMR);
    delayms(2 + obj*8);
    pga460_write_register(uart, EE_CNTRL_ADDR, 0x00);

    and it didn't work, when I switched to this:

    pga460_ultrasonic_cmd(uart, presset, obj); 
    delayms(45);
    pga460_send_comand(uart, UMR);
    delayms(2 + obj*8);
    pga460_write_register(uart, EE_CNTRL_ADDR, 0x80);
    delayms(10);
    pga460_write_register(uart, EE_CNTRL_ADDR, 0x00);

    It worked.