This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FreeRTOS: problem with having 2 SPI instances in two different tasks

Hello guys,

I am dealing with a problem, i have two tasks with two different spi instances, alone they work fine, but when i want to run both tasks they crash!!

Parents
  • You need to give us more information on your initialization and other task related arguments for us to understand more. Code snippets or attaching the project file will significantly increase your chance of finding a solution here.

  • Hi Susheel, 

    so the initialization is the regular FreeRTOS initialization for tasks, where each task receive the instace parameteres 

      UNUSED_VARIABLE(xTaskCreate(helloWorld, "LED0", configMINIMAL_STACK_SIZE+200  , NULL, 7, NULL));
      UNUSED_VARIABLE(xTaskCreate(spi_Task, "SP0", configMINIMAL_STACK_SIZE+200  , spi_0_mem_str_pointer, 6, NULL));
      UNUSED_VARIABLE(xTaskCreate(spi_Task, "SP1", configMINIMAL_STACK_SIZE+200  , spi_1_mem_str_pointer, 2, NULL));

    The instances are not the problem as each work correctly separatedly, so i am guessing it has something to do with the clock being unable to supply both instances at the same time , besides, they work correctly without freeRTOS

Reply
  • Hi Susheel, 

    so the initialization is the regular FreeRTOS initialization for tasks, where each task receive the instace parameteres 

      UNUSED_VARIABLE(xTaskCreate(helloWorld, "LED0", configMINIMAL_STACK_SIZE+200  , NULL, 7, NULL));
      UNUSED_VARIABLE(xTaskCreate(spi_Task, "SP0", configMINIMAL_STACK_SIZE+200  , spi_0_mem_str_pointer, 6, NULL));
      UNUSED_VARIABLE(xTaskCreate(spi_Task, "SP1", configMINIMAL_STACK_SIZE+200  , spi_1_mem_str_pointer, 2, NULL));

    The instances are not the problem as each work correctly separatedly, so i am guessing it has something to do with the clock being unable to supply both instances at the same time , besides, they work correctly without freeRTOS

Children
Related