Should these be these?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Labels:
-
STM32CubeMX
-
STM32L5 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-20 1:45 AM
Except, if break is used. Or even goto... :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-20 12:15 AM
So, if one need insert code behind while(), where should it be pasted?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-20 1:45 AM
Except, if break is used. Or even goto... :)
