I am using RDVCU5775EVM with Matlab 2019b
I encountered a problem, when I use SPI communication mode to control the LSD output pin of the development board, no matter what message I send to the LSD chip, there will be two LSD pins continuously output (connected to GND), for example, I send three consecutive 8-byte messages (three frames are uint 0), theoretically all LSD pins should not output. However, the measurement found that the above two pins are still output state.
I replaced two boards of the same size. It's the same thing. Does anyone understand why?
Solved! Go to Solution.
The cause of this problem was found to be SPI sequence mismatch. The MC33996 LDS chip uses the second edge of the clock trigger to recognize the data sent by the MOSI pin, however, I chose the first edge when configuring the SPI configuration model, which means that the master sends data according to the first edge of the clock trigger.
I observed the signal with an oscilloscope, and the MOSI signal went up at the same time as the second side, so the MC33996 recognized a data "1" (which should be a useless data) when the signal went up, and it controlled the corresponding pin output.
The uncontrolled pin just matches the rising edge at the end of the first byte and the second byte. In other words, the MC33996 is receiving different control data than I want to send, which is why I can't control the PWM output.
The cause of this problem was found to be SPI sequence mismatch. The MC33996 LDS chip uses the second edge of the clock trigger to recognize the data sent by the MOSI pin, however, I chose the first edge when configuring the SPI configuration model, which means that the master sends data according to the first edge of the clock trigger.
I observed the signal with an oscilloscope, and the MOSI signal went up at the same time as the second side, so the MC33996 recognized a data "1" (which should be a useless data) when the signal went up, and it controlled the corresponding pin output.
The uncontrolled pin just matches the rising edge at the end of the first byte and the second byte. In other words, the MC33996 is receiving different control data than I want to send, which is why I can't control the PWM output.
Hello @RegulusCheng,
In the past we have provided some support for the LSD output, so could you please have a look at the following thread here? https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Request-for-HSD-LSD-MSDI-Communication-...
Maybe it is something related to the SPI settings on the MPC side or the bytes sent on the SPI communication are not properly aligned. Could you please share the model or the communication settings with us?
Regards,
Marius
Hi,
It has been four months since we consulted with you last time. During this period, I was busy with other work and did not pay attention to the progress of this problem.
Recently, I purchased another piece of RDVCU5775EVM and conducted debugging, and found that this problem still exists, which is as follows:
1. There are two pins out of control, as long as the LSD module is used, it will maintain the output (connect to ground). For example, for the board in my project, regardless of the content of the SPI instruction sent to the LSD chip (such as sending 0x 00 00 00, which should not be output by all pins), K13, L12 (LSD0, LSD8) two pins will still be connected to the ground.
2. The control seems to be misplaced. According to the LSD chip manual, the SPI instruction controls the output state of LSD0-10 respectively from the low level. For example, send the instruction 0x 00 00 01, which should be LSD0 (K13) pin output, but the controlled channel in the actual test is LSD1 (K12) pin, and other channels are also one channel backward dislocation.
I wonder if you can provide relevant support. If you need more information, please contact me.
Hi, Marius
Thanks for getting back to me so quickly. I've already seen the thread https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Request-for-HSD-LSD-MSDI-Communication-..., and it really helped me a lot, allowing me to successfully control the LSD output for the first time.
However, as I understand it, the main chip controls the output of the LSD chip through a 24-byte SPI communication (sending a 3*uint8 byte array), where the low 11 bytes correspond to the output state of the 11 LSD channels. The three uint8 data I send are all 0, so none of them should output, but there are actually two channels that output whatever data I send.
Here is my model built with Matlab 2019b, Please give me some suggestions.
I have solved the MSDI digital channel, which is also controlled by SPI, by reading the user manual of the CD1030 chip, maybe I should also read the user manual of MC33996 (U16), too?
By the way, I also ran into problems with analog channels using AMUX in MSDI, I will write another post to discuss, thanks.
Regards,
Regulus