2024-11-04 02:55 AM
I have a program with various tasks, in one of these I send a request and, after that, I wait for a response, so I have a cycle like this
SendRequest();
do
{
WaitResponse();
DelayMillisecondS(200);
}while (Timerisnotexpired());
the Problem is that the answer takes time to be given and I receive messages like this "Target is not responding, retrying...", sometimes I receive a sequence of this messages and the debug connection terminates. Probably, the clock to the stlink fails, but I don't know how to make up with this. I have lowered the frequency of swd interface and I have enabled "Suspend watchdog counters while halted", but the problem remains.
Any help would be appreciated.
Thank you
Isabella
2024-11-04 02:58 AM
@IVent.1 wrote:the Problem is that the answer takes time to be given and I receive messages like this "Target is not responding, retrying..."
where, exactly, do you get that message? STM32cCubeIDE? other? version?
Does WaitResponse() put your target to sleep?
2024-11-04 07:00 AM
No, WaitResponse() only check the uart for some response.
I receive that message in the Console Window.
Using Stm32CubeIDe 1.16.0