This project can be implemented in the following manner:
1) Declare a structure with the elements whose values will be received via UART.
2) The UART Rx interrupt must be used to get the ASCII characters. There should be two arrays, one to store the element name like "rate", "gain" etc and another to store the corresponding numerical values in ASCII such as "10000", "4", etc
3) If the ASCII character received is not a numerical number (between 0x30 and 0x39), then store it in the NAME array. If the received ASCII character represents a number, that is, between 0x30 and 0x39, then store it in the NUMBER array.
4) Once a pair of NAME and NUMBER array is received, then the number received is mapped to the element of the structure to which it belongs. For this two operations is to be done in the main. The NAME array should be checked if it is equal to "rate" or "gain". When one of them matches, the corresponding number should be assigned to the element of the structure. The received numerals in ASCII format should be converted to a number. Example, "10000" will be stored as {0x31, 0x30, 0x30, 0x30, 0x30}. A function should be written to convert it to hexadecimal format. This number should be assigned to the element of the structure, like example.rate = 10000, example.gain = 4.