Other Parts Discussed in Thread: TIDA-00151
Hi everyone,
I am currently working with a PGA450Q1EVM-S ultrasonic sensor and I am analyzing its firmware. In particular, I download the TIDA-00151 UART & LIN Demo Firmware for PGA450-Q1 v2.4 (Rev. D) from this link ( http://www.ti.com/lit/zip/tidcab3 ) directly from the PGA450-Q1 page ( http://www.ti.com/product/PGA450-Q1/toolssoftware ).
First of all, is this firmware the one uploaded on my sensor, which I bought a month ago?
If yes, while I was reading the code, I noticed something strange in the pga450_main.c file:
functions command1 and command5 call, at lines 175 and 358 respectively, the burst_cap_comp function which is declared at line 536. From the burst_cap_comp declaration it seems that it expects a comm input which represents the communication interface (0 means UART communication, 1 means LIN). When a look at the burst_cap_comp call in command1 and command5, they call it passing the range variable as input. I think that this could be a bug; infact, if I trigger a command 1 in short mode using an UART communication (command 0x00 0x55 0x11 0x01 0x00), in the command1 function, the range variable is equal to 1 and when it calls the burst_cap_comp function with 1 as input, the latter uses range as comm thus triggering case 1 in the initial switch, which sets the function as if it was called using a LIN communication.
Am I missing something?
Thanks in advance
GD