This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

usec (or) microseconds in CMSIS RTOS

Anyone suggest me how to implement delay_microsecond in CMSIS RTOS?

here is my code

#include "cmsis_os.h"

void start_alive_led(void const * argument)
{
  /* USER CODE BEGIN start_alive_led */
  /* Infinite loop */
  for(;;)
  {
                HAL_GPIO_WritePin(alive_GPIO_Port,alive_Pin,GPIO_PIN_SET);
                osDelay(500);
                HAL_GPIO_WritePin(alive_GPIO_Port,alive_Pin,GPIO_PIN_RESET);
                osDelay(500);
  }
  /* USER CODE END start_alive_led */
}

the task/thread function works fine with 500ms

How to acheive delay in micro seconds - usec

i need to implement IR buster, so i need usec delay for each 1 and 0..

please help thanks