Skip to main content
STAR
Associate III
February 12, 2021
Solved

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

  • February 12, 2021
  • 2 replies
  • 759 views

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

This topic has been closed for replies.
Best answer by KnarfB

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

2 replies

KnarfB
KnarfBBest answer
Super User
February 12, 2021

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

STAR
STARAuthor
Associate III
February 12, 2021

Thank You KnarfB for your reply..

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