-
AuthorPosts
-
-
We are currently building a telemetry platform that runs off a Raspberry Pi using a CAN hat. We were hoping to integrate this into the Audesse’s Pi but as far as we can tell, the only way to get CAN on the MPU is to forward it over SPI.
We tried simply changing the 60 byte array being sent to the Pi to be filled with 200 instead of 255 (within the data stores initial value) and by running the spiLogger python code on the mpu, we got the following (see attached screenshot).
It seems every third message is filled with bytes representing 255 instead of 200 as well as messages randomly having bytes representing 255 within them.
We are looking into the application of FlexConnect, however we are still interested in this topic. Any advice on the best way to get CAN data to the Pi would be greatly appreciated.
-
-
Hi Brian,
Your screenshot shows a very interesting behavior, the data seems to be drifting which might indicate a protocol mismatch in the MPU-MCU communication.
The first thing I always recommend is implementing some sort of data-checking logic to validate incoming messages. But in your case, I would make sure that the number of bytes per transfer is the same on both sides.
I can try to help you further if you could provide a stripped down version of the Simulink model that is causing these issues.
– Omar
-
Hi Omar,
I agree that data checking will definitely be a must and will be implemented in the program.
Attached is the Simulink model that I used to create these issues. It is nothing more than the provided template model with the ‘spiToPi’ data store changed from 255 to 200 as its initial value.
-
It seems the forum doesn’t allow the uploading of .slx files…
Here is a dropbox link to the simulink model: https://www.dropbox.com/scl/fi/ebfm2dnps4rg8zh2x3nfg/spiTest.slx?rlkey=py7oo1lqcsx2z63f6c61bx3vx&dl=0
-
-
AuthorPosts
- You must be logged in to reply to this topic.