API Implementation Updates

In the previous posts, we discussed the progress of our API design.  With this design, we have began researching the best ways to implement transactions between the MCU and GUI using either the USB or USART/UART port on the STM32 Microcontroller connected to the computed to display on the GUI.  So far, we have decided that the computer will receive and send data from the MCU connect the via the USART port on the MCU because:

  1. The USART port can send data via bytes serially.  With the current rough draft of our API design, the protocols on each component will be determining what error codes to send to the GUI.  These error codes will be given to the MCU, which will send it to the GUI via the USART port.
  2. The USART port can transmit data via bytes serially; by sending bytes serially, we can enumerate and send control signals to the MCU that will indicate what type of error we would like to simulate.
  3. If we do implement combinations of errors, we could enumerate the combinations of errors into error and control signals, allowing for us to simultaneously test the detecting of multiple errors.

Currently, we are deciding between implementing this in C or microPython.  Using C, it would be less of a learning curve and would be able to integrate better with our programs that we are already writing in C.  However, using microPython would be less difficult given the various built-in libraries and would allow for us to integrate easily with external C programs that we could write if the built-in functions are insufficient.  Furthermore, microPython offers libraries custom to STM32. We feel that deciding whether to use C or microPython will depend on what will integrate best with the remaining aspects of our design that still need to be determined.

To-Do:

  1. Research more into microPython and C implementations of USART and determine which one will fit best with our design.
  2. Determine how the remaining components like the communication between MCU to I2C, SPI etc. will be implemented

 

 

One thought on “API Implementation Updates”

Leave a Reply

Your email address will not be published. Required fields are marked *