When I try to read the TCAN4550 device ID in a loop, the first time, I get no response.
After this request I read the Status Register (0x000C), it gives me 0x0031000A as a response. This means the "SPI_end_error", "Invalid_command", "read_underflow", "Internal_access_active" and "SPI_error_interrupt" bit are set. I am not sure why these errors occur.
Here are some screenshots of the oscilloscope:
(just for clarity; CLK is yellow, nCS is pink, MISO is blue, MOSI is green)
This shows both requests; Device ID (the first block) and Status Register (the second block).
This shows the request of the Device ID register (at address 0x0000), but there is no data on the MISO.
These messages are in a loop. The next time the mcu enters this code, the TCAN does send a response:
Although the Status Register still is set to 0x0031000A (same as before).
What causes these error bits to be set? And how to fix these mistakes?