2021-01-19 10:54 PM
I found these prompt in my "main.c" of NonSecure generated by MX for NUCLEO L552ZE-Q:
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
should it be this?
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE BEGIN 3 */
/* USER CODE END 3 */
}
/* USER CODE END WHILE */
}
Solved! Go to Solution.
2021-01-20 01:45 AM
Except, if break is used. Or even goto... :)
2021-01-19 11:00 PM
No. These are 2 user code blocks around the beginning and ending of the loop. Some additional software packs may generate code inbetween those (near line 5), do not use it for user code.
2021-01-20 12:15 AM
So, if one need insert code behind while(), where should it be pasted?
2021-01-20 12:40 AM
You can add user code by inserting new lines between 1 and 2 (before while), 3 and 4 (inside while), 6 and 7 (inside while), or 7 and 8 (after while) as you like.
Code behind while(1) {...} is unreachable however.
2021-01-20 01:45 AM
Except, if break is used. Or even goto... :)