Answered step by step
Verified Expert Solution
Question
1 Approved Answer
hello guys, I need the following 3 tasks coded in C . you can only use C and use the send commands below. thanks. I
hello guys, I need the following 3 tasks coded in C . you can only use C and use the send commands below. thanks.
I have also attached a sample of my code. it runs properly however I don't know where to put the osThreadSuspend so it stops after 10 times. thanks
- TaskLetters: this task should send to your PC debug console the characters "ABC...Z" followed by newline ( ), in sequence, one at a time, every 100ms a total number of 10 times. After that, the Task should suspend itself. - TaskNumbers: this task should send to your PC debug console the characters "0123...9" followed by newline ( ), in sequence, one at a time, every 100ms a total number of 10 times. After that, the Task should suspend itself. - TaskBlinks: this task should perform 5 blinks of the board's LED every 4s. Each blink should turn on the board's LED for 200ms and turn off the LED for 200ms. When turning on the LED, the task should send ' '. After completing the 5 blinks, the task should send a newline (' '). The series of 5 blinks should be performed a total number of 10 times. After that, the Task should suspend itself. - ITM_SendChar(c); //sends a char in the variable c to the PC debugging terminal. NOTE: This function can only send one character at a time! To send a newline character, use ITM_SendChar (' ') (use single quote (') instead of double quote (")). - HAL_Delay(100); //adds a delay of 100ms in the code. Note: with HAL_Delay, the task still consumes CPU cycles. It is equivalent to having a loop with nothing inside. - osThreadSuspend ( osThreadGetld ()); //puts the currently running thread in SUSPENDED state
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started