I am using TLE9201SG to drive a window motor with TMS320. When I sent a diagnostic read signal (0x00), it returned me the default diagnostic signal (0xDF), but after that things got messy and I only started getting repeated messages, for example when I sent 0xC0 it sent back 0xC0, when I sent 0xA0 it returned 0xA0. Things start to go smoothly if I just use the WR_CTRL_RD_DIA command, but when I send a RD_DIA command or a wrong command, it gets stuck in this repeated message hell. How can I solve this.
Thanks for your patience!!
- Could you please check if the data is being transferred “MSB first”?
As per the TLE9201SG datasheet: The first SPI response provided after power-up is the device revision number (RD_REV).
2. Could you please confirm if the device revision number is received at the first instance?
For any unspecified commands, the device will respond with the content of the diagnosis register (RD_DIA).
3. In your question the data 0xA0 is being sent which is an invalid command then it will return only the content of the diagnosis register. Could you please check if the command (0x00) and (0xA0) gives the same content without any other modification to the control register?
The short circuit and VS undervoltage diagnosis is coded in the DIA bits according to the following truth table. Together with transmission validation bit TV (always 0), it is ensured that there is always at least one 1->0 change at SO during a valid transmission. Therefore a “stuck at” failure of the SO pin can be detected.
4. Could you please check this functionality with the 0xE0 to check “stuck at” failure?
For further reference please refer to section 4.12 Serial Peripheral Interface (SPI) of the TLE9201SG datasheet.
Sory for the late response.
1- I am sure that I am sening msb first
2- The device give me "0x21" for the first response. Which I believe is the rev number.
3- That is my problem. Acording to datasheet I must get a diagonis response but it constantly send the same message. I checked again. When I send 0xa0 I get 0xa0. When I send 0x00 I just get 0x00.
4- When I send "0xe0" response is "0xe0"
When I send "0xc0",0xcd" and "0xcf" the chip responds correctly. After sending these messages I can turn on the motor and stop it. When I check the response it sends the diagnostic. But when I try to send 0x00 or any other wrong message, the chip start to response with the same message.
Thanks for your patience!!
I tested H-BRIDGE KIT 2GO for the above issue and it is working as expected. For your reference:
Please checkout the example project "H-Bridge 2Go – Simple Motor Control DAVE4" for correct implementation.
- Check the SPI configuration
- Implementation of SPI algorithm to write and read the data
Please let us know how the data is being sent in your application as well as hardware setup.