Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


You are viewing a reply to Delays not working  

Delays not working STM32F446RE

I am using STM32F446RE (nucleo board) and Keil uVision5.33..0

following is the snippet:

  1. include
  2. include “Board_LED.h”

int32_t custom_delay()
{
uint32_t unTimeDelay = 0;
uint32_t unTimeDelayCounter = 50000;
for(unTimeDelay = 0; unTimeDelay != unTimeDelayCounter; unTimeDelay++);
return 1;
}

int main (void)
{
uint32_t unLEDIndex = 0;
int32_t nFunctionReturn = 0;
nFunctionReturn = LED_Initialize();
while(1)
{
nFunctionReturn = LED_Off(unLEDIndex);
nFunctionReturn = custom_delay();
nFunctionReturn = LED_On(unLEDIndex);
}
return 0;
}
The delay above is not working.

France

What do you mean by “not working”?

Looking at your code, anyway, even if you run the core at only 16MHz (the default at reset), a 50000 loop, if correctly optimized by the compiler, may run for only 5 to 10 ms, meaning the blinking will be totally invisible.

Try first by increasing a lot the loop delay (from 50,000 to 5,000,000 for example, or even more if you run at 480MHz) and see what happens.

Bernard (Ac6)

BTW, this forum is for users of System Workbench for STM32, not of Keil µVision...