Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Legacy microcontrollers Forum Discussions

User18091
Level 1
First reply posted First question asked
Level 1
Sensor: Position2Go

I have this problem with "Infineon\IFX_P2G-HW-SW_V1.0.2\Firmware_Software\Communication Library\ComLib_C_Interface\examples\extract_raw_data.c"

After listening to the 'ep_radar_base_get_frame_data' for about one hour I got "The device didn't send any message" error message. Why would the sensor stop sending data? What function can help with debugging the problem? The program didn't crash, simply it stopped reporting the data.

I was able to replicate the issue multiple times. The device was on power all the time and no other USB devices were attached/detached during the listening.

Below is the code snipped where I got the error message.


...
while (1)
{
// get raw data
des = ep_radar_base_get_frame_data(protocolHandle, endpointRadarBase, 0);

if(des < 0) {
printf("%s (%d)", protocol_get_status_code_description(protocolHandle, des), des);
}
}
...
0 Likes
3 Replies
User17566
Level 2
First solution authored 5 replies posted First reply posted
Level 2
This happens to me as well. I just check the error code, and if its the one for "Device didn't send any message" I ignore it and keep going.

Have you checked the device temperature at all? I've noticed the Position2Go starts to become unstable above 80 C.
0 Likes
User18091
Level 1
First reply posted First question asked
Level 1
Thanks @agallenSMX for that suggestion. That is the error message I got: "Device didn't send any message". I checked the temperature and it is ~66C-67C while reading the data and around the time it stops. Did you make any progress with this problem?
0 Likes
User18091
Level 1
First reply posted First question asked
Level 1
Got this from Infineon support:


In the file “\Application\src\application.c” in the function body of “void app_init( void)”

around line 144:

One argument of the call to protocol_init(…) should be changed:
From:
protocol_init(endpoint_list, sizeof(endpoint_list)/sizeof(endpoint_list[0]), SYSTIMER_GetTime, BSP_HOST_TIMEOUT_USEC, system_reset);
to:
protocol_init(endpoint_list, sizeof(endpoint_list)/sizeof(endpoint_list[0]), NULL, BSP_HOST_TIMEOUT_USEC, system_reset);

The handler function to get the system time should be set to NULL. This disables the wrongly implemented time-out check of the protocol.
With that wrong implementation, the device detects a time-out and resets the communication after about 65 minutes, and the host would require to resume the connection.
0 Likes