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...


 

Newest Forum Posts

  1. SW4STM32 installation on Ubuntu 20.04 LTS by mahnac72, 2022-01-17 09:12
  2. STM32G0B1 support by Nevada, 2022-01-14 18:47
  3. compiling date/time by yang@omniverter.com, 2022-01-13 20:07
  4. compiling date/time by tang, 2022-01-13 10:51
  5. compiling date/time by yang@omniverter.com, 2022-01-12 19:19
  6. STM32429 Discovery board Linux problem by llcheng, 2022-01-10 10:38
  7. STM32F030K6T6 Pa7 Question by jobhunter, 2022-01-07 10:20
  8. System workbench how to configure openocd debug by gxz, 2022-01-03 15:49
  9. Auto generate build/version number by katarcza, 2022-01-01 11:00
  10. Charger firmware by kacio, 2021-12-30 09:04

Last-Modified Blogs