-
AuthorPosts
-
-
I’ve having an issue where SPI comms are unreliable when I power up some high voltage motors on the same system. I’ve got SPI communication going back and forth between the MPU and MCU with 100% success rate when I have only the FlexBench turned on with my 12V sensors powered. When I turn on the actuators for the vehicle on the 48V and high voltage busses, I start to get really terrible SPI comms. I’ve played around with which SPI mode is selected in the SPI master transmit block on the Simulink side as well as the CPOL and CPHA parameters on the MCU side. It seems like any variety of these parameters (surprisingly) allow for transmission when the motors are not powered but don’t seem to be making any difference when the motors are active.
SPI settings:
Bus Speed: 500 kHz
Message Length: 228 bytes
Send interval: 0.01 secondsI’m programming both MCU and MPU with MATLAB 2023a at this point, in case there are any issues there.
-
Hi Craig,
How does the MCU interact with the motors through software? Is it providing direct outputs, sending serial commands? If sending serial, do the commands start/stop in sync with the power up? I want to rule out timing problems in software.
-
Hi Craig, please let me know about my above comments. In addition, here are a few extra troubleshooting for the K1 processors (FlexBench and FlexCase S):
Make sure the System Start block in your MCU init has the reset sensitivity turned down and the SPI buffers tri-stated (see the latest Simulink empty project sample for reference).
Try using data integrity checks to filter out bad data using the latest Audesse Simulink blocks (see the FlexConnect sample model)
To help isolate the problem, try temporarily changing the operation of the MPU-side to a simplified model or a python script so you can observe printouts of individual transfers.
-
-
AuthorPosts
- You must be logged in to reply to this topic.