cancel
Showing results for 
Search instead for 
Did you mean: 

How to sent data from one process to another process using CMSIS2 RTOS.

STAR
Associate II

Hiii All,

I am new in CMSIS2 RTOS Development .

I used STM32F072RB UC. In that I am using CMSIS2 RTOS . I have created two processes, One is for reading the key pressed detection and second is for handling leds according to key pressed and released. How to sent key pressed and released data from one process to another process.

my Process one is,

void StartDefaultTask(void *argument)

{

 /* Infinite loop */

 for(;;)

 {

 for(uint8_t i=0;i<0x0F;i++);

     if(0== HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0))

     {

   // Want to sent data to another process

    }

  }

 /* USER CODE END 5 */

}

My second process is ,

void StartTask02(void *argument)

{

 /* USER CODE BEGIN StartTask02 */

 /* Infinite loop */

 for(;;)

 {

// If data received from process one then want to toggle the led

HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_9);

   osDelay(100);

 }

 /* USER CODE END StartTask02 */

}

Your valuable guidance will be highly appreciated,

Regards,

STAR

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

osMessageQueuePut, osMessageQueueGet. cmsis_os2.h and Keil have some docs.

View solution in original post

2 REPLIES 2
KnarfB
Principal III

osMessageQueuePut, osMessageQueueGet. cmsis_os2.h and Keil have some docs.

STAR
Associate II

Thank You KnarfB for your reply..

I got it Now ....thank you very much