AnsweredAssumed Answered

Setting on RTOS ?

Question asked by H.Rick on Mar 4, 2017
Latest reply on Mar 24, 2017 by H.Rick

Everybody,

 

How can I use SDIO, USB with RTOS ?

I tried initialized RTOS but, SDIO is stopped initializing for some reasons,

 

Anyone knows ?

Without RTOS, they are working ok.

 

How to put those functions inside RTOS ?

 

I tried to understand :

http://www.st.com/content/ccc/resource/technical/document/user_manual/2d/60/ff/15/8c/c9/43/77/DM00105262.pdf/files/DM00105262.pdf/jcr:content/translations/en.DM00105262.pdf

 

Anyone knows ?

 

Shall I put test code here :

void MX_FREERTOS_Init(void) {
  /* USER CODE BEGIN Init */
       
  /* USER CODE END Init */

 

 

  /* USER CODE BEGIN RTOS_MUTEX */
  /* add mutexes, ... */
  /* USER CODE END RTOS_MUTEX */

 

  /* USER CODE BEGIN RTOS_SEMAPHORES */
  /* add semaphores, ... */
  /* USER CODE END RTOS_SEMAPHORES */

 

  /* USER CODE BEGIN RTOS_TIMERS */
  /* start timers, add new ones, ... */
  /* USER CODE END RTOS_TIMERS */

 

  /* Create the thread(s) */
  /* definition and creation of defaultTask */
  osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 128);
  defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);

 

  /* USER CODE BEGIN RTOS_THREADS */
  /* add threads, ... */
  /* USER CODE END RTOS_THREADS */

 

  /* USER CODE BEGIN RTOS_QUEUES */
  /* add queues, ... */
  /* USER CODE END RTOS_QUEUES */
}

 

/* StartDefaultTask function */
void StartDefaultTask(void const * argument)
{
  /* init code for FATFS */
  MX_FATFS_Init();

 

  /* init code for USB_DEVICE */
  MX_USB_DEVICE_Init();

 

  /* USER CODE BEGIN StartDefaultTask */
  /* Infinite loop */
  for(;;)
  {
    osDelay(1);
  }
  /* USER CODE END StartDefaultTask */
}

 

/* USER CODE BEGIN Application */
     
/* USER CODE END Application */

 

How can I add new task ? and why STM32 suggesting me not using SYSTICK but use TIMER ?

Outcomes