Connecting to Sensor XCP internal error

조회 수: 13 (최근 30일)
Aaron Troll
Aaron Troll 2024년 3월 13일
답변: Aaron Troll 2024년 5월 2일
External Mode Open Protocol Connect command failed
Caused by:
  • Could not connect to target application: XCP internal error: timeout expired, in response to XCP CONNECT command
I am trying to connect to a ICM20649 IMU Sensor that is connected to an Arduino Nano that is connected over USB with Matlab.
The setup seems to be correct as I am able to communicate with the sensor via Arduino IDE and I am able to read the Temerature from a ICM20948 Arduino Library block (which seems to be similar enough) with the same Hardware settings in Matlab. That means I can communicate with the arduino from Matlab and actually read data - just not with the code from the IODeviceBuilder.
the line of code where the SPI communication is started seems to be the issue.
icm.begin_SPI(ICM_CS, ICM_SCK, ICM_MISO, ICM_MOSI)
This does not make sense to me as this line of code is used in the Arduino IDE aswell and is working. For some reason the IODeviceBuilder App seems to have problems with sending SPI commands?

채택된 답변

Aaron Troll
Aaron Troll 2024년 5월 2일
This was caused by a hardware failure where the SCL did not work.

추가 답변 (1개)

Aditya Shah
Aditya Shah 2024년 3월 15일
Hi,
Extended setup times can cause XCP external mode to fail with the error you've mentioned.
Check for any delays in the generated CPP template file and reduce them.
For debugging, use "Serial.print" to gather more insights.
  댓글 수: 2
Aaron Troll
Aaron Troll 2024년 3월 15일
Hi,
How can I view what is printed over Serial in the external mode? The Serial Receive does not work as the COM port is used by the Monitor and Tune as far as I understood.
Aditya Shah
Aditya Shah 2024년 3월 15일
Hi,
For viewing serial printouts, use the "Build, Deploy & Start" feature.
To assist further, share the generated system object files, along with the modified cpp file(generated template) and the 3p library you are using for ICM20649 IMU Sensor, for further investigation.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sensors에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by