AnsweredAssumed Answered

FREE_RTOS

Question asked by Jean DEMBEGA on May 24, 2018
Latest reply on May 25, 2018 by Artur I

Hey,

I am getting started with FreeRTOS on NUCLEO-FO72RB.

i set UART communication using DMA.

i would like to writre tu UART from muliple taske using queue with size of 16 items;

so i created 3 tasks.

- one task1 to receive to read Data from Queue and send it to UART DMA; this task run each 1000ms to take data from queue

- on task "SW" that write to queue each 100ms the string "Hey from SW Task; cnt2= %u";

- one task "ADC" that write to queue each 200ms the string "Hey from ADC Task; cnt1=%u" ;

 

the idea is that the "SW" will load each time 2 data in queue and then "ADC" load on Data.

but when i run the code, à got this in virtual terminal:

 

Hey from SW Task; cnt2= 1

Hey from ADC Task; cnt1= 6

Hey from SW Task; cnt2= 12
Hey from ADC Task; cnt1= 8

Hey from SW Task; cnt2= 12
Hey from SW Task; cnt2= 12
Hey from ADC Task; cnt1= 11
Hey from SW Task; cnt2= 12
Hey from SW Task; cnt2= 12
Hey from ADC Task; cnt1= 14
Hey from SW Task; cnt2= 12
Hey from SW Task; cnt2= 12
Hey from ADC Task; cnt1= 17
Hey from SW Task; cnt2= 12
Hey from SW Task; cnt2= 12

Hey from ADC Task; cnt1= 20
Hey from SW Task; cnt2= 12

Hey from SW Task; cnt2= 12

Hey from ADC Task; cnt1= 23
Hey from ADC Task; cnt1= 24
Hey from ADC Task; cnt1= 25
Hey from ADC Task; cnt1= 26

Hey from ADC Task; cnt1= 27

Hey from ADC Task; cnt1= 28

Hey from ADC Task; cnt1= 29

Hey from ADC Task; cnt1= 30

Hey from ADC Task; cnt1= 31

Hey from ADC Task; cnt1= 32

Hey from ADC Task; cnt1= 33

Hey from ADC Task; cnt1= 34

Hey from ADC Task; cnt1= 35

 

could someone tel me what is the mistake? in joined the code for kiel µVision V5.

Attachments

Outcomes