Hi,
I have multiple pga450 devices on a lin bus. I have implemented an addressing scheme together with basic commands by using the PID (upper 3 bits for command, lower 3 bits for address). I can communicate with the devices fine using their assigned addresses. but my problem is the first time when I tell a device to do a measurement and then ask if for the time of flight data back, I just receive 0xFF 0xFF from the time of flight variable.
this is because the condition in code:[ if ( echo_data > DetectionThreshold) ] is never met. But at the second reading it is, and then afterwards every signel time I do a reading I get valid data. Then when I take a reading on another device, I again need to do 2 readings to get a valid response, and going back to the previous device, 2 readings needed again. this is not an interference issue between devices, I can wait seconds or minutes in between readings it does not matter. I am also sure that the RX interrupt of the wrong devices are not triggered, but still there are some interference when communicating with another device.
any ideas?