Real Time Embedded System

Job ID: 36478299

Budget: $30 – $250 USD

Create a program in C that will do the following.
Create a task to blink LED1 at a programmable rate, starting at 10Hz. Use a mailbox or Mutex protected static variable to change the rate.
• Create a set of functions to emulate an EEPROM with 1K byte of storage
• The write function will store a byte of information in the next available location of the
"EEPROM" and delay 20mS before returning. The write function will ensure that data is never written outside of the 1K storage buffer. The write function will automatically increment the next write index.
• The setReadAddress function will set the index for the next read operation in the 1K
buffer
• The setWriteAddress function will set the index for the next write operation in the 1K
buffer
• The getDepthfunction will return the index for the write operation in the 1K buffer
• The read function will return a byte of information from the next available location of the "EEPROM" and increment the next read index.
The erase function will fill the 1k buffer with Oxff in all locations and point the next address to the first location in storage and delay 100ms before returning
If an attempt is made to write or read outside the storage area the attempt will be aborted and an error value returned
• Protect access to the EEPROM functions using a Mutex
• Create a task that will pend on a command mailbox and respond to the following commands
• Erase the EEPROM
• Store a string in the EEPROM and print the string to the console
• Print all strings in the EEPROM to the console
• Print the number of bytes used in the EEPROM to the console
• Create a task that uses an event to toggle LED2 or LED3 when Switch 1 or Switch 2 is pressed.
When the LED is toggled a message indicating which LED is changing will be printed to the console.

• Create a console task with the following commands
• Help -prints a list of commands or help string for a specific command
• BlinkRate - Sets the blink rate in the range of 10Hz to 1Hz based on a passed operand
Eewrite - Writes a string the the EEPROM
Eeread - Reads all strings in the EEPROM and prints them to the console
Eeerase - Erases the EEPROM
Testwdt - with parameters for each task (except the health task) to cause the specified task to stop updating the WDT.
Set up the kernel systick to count every 5 m§
Create a health task that will use an event instance to monitor the health of the system
Each task will have a separate event flag that will be posted from the task no less often than every 5 seconds
If a task does not report in during any 10 second period, print an error message to the console
Create a task that will check the amount of unused bytes in the EEPROM and blink LED4 at the following rates:
0-128 bytes - 2 hertz blink
129-512 bytes - 4 hertz blink
513-640 - 8 hertz blink
>= 641 - 16 hertz blink