2024-05-20 11:23 PM
I built a project in STM32F411E-DISC . project is built successfully and also when we debugged no issue is found ,but after debugging only ORANGE LED is toggling rest 3 LED is not toggling . kindly help me to resolve this issue .kindly find for code and microcontroller.
Solved! Go to Solution.
2024-05-20 11:36 PM - edited 2024-05-21 02:35 AM
Hello,
Are you sure you’re configuring the right GPIOs?
Enabled RCC clock for the GPIO ports?
PS: please in next time either you put the source code in the comment using </> button or simply attach it.
Please don't attach code screenshots.
Thank you.
2024-05-20 11:36 PM - edited 2024-05-21 02:35 AM
Hello,
Are you sure you’re configuring the right GPIOs?
Enabled RCC clock for the GPIO ports?
PS: please in next time either you put the source code in the comment using </> button or simply attach it.
Please don't attach code screenshots.
Thank you.
2024-05-21 04:30 AM
where is RCC clock for the GPIO ports in CUBEIDE and how to enable this
2024-05-21 04:40 AM
Hello,
You need to use CubeMx (in CubeIDE) to configure the peripherals and generate the corresponding code.
I've attached a project running on F411-DISCO board toggling the 4 LEDs. I didn't test it but should work.
2024-05-21 11:26 AM
Always use CubeMx to generate a code template.
This does the necessary initialization of the GPIOs including the clock enabling.
Thereafter, simply one line code to toggle LEDs.
2024-05-21 11:08 PM
Your attached project running fine and all LED is toggling but , what is the issue in my code . can you please help me.
2024-05-21 11:45 PM
Apparently, you are running multiple tasks and using the HAL_Delay() function.
This creates a problem. The solution is to change the Time Base from sysTick to another Timer.
The SysTick is a special timer in most ARM processors that’s generally reserved for operating system purposes. By default, SysTick will be used for things like HAL_Delay() and HAL_GetTick(). As a result, the STM32 HAL framework gives SysTick a very high priority. However, FreeRTOS needs SysTick for its scheduler, and it requires SysTick to be a much lower priority. Therefore, a quick workaround is to use a Timer as a Time-base source in the cases of freeRTOS.
You can adapt the example from the attached tutorial material.
Refer to Page 22.
2024-05-24 04:16 AM
why code generation section is blank . i build 2 project but still in both project code generation section is blink , how to resolve this issue
2024-05-24 04:49 AM
refer to the snapshot, and Click the Right-Top Corner to generate the Code.
The one you have circled up is to setup the parameters.
2024-05-24 05:13 AM