MCU

Overview

mcuApi.svg
MCU API Diagram



The above figure shows a general outline of the operation of the MCU API. As can be seen in this figure, we have on the one hand the service itself and the API, which run inside the CPU, and on the other hand the firmware in charge of the tasks of monitoring the signals that runs from the MCU. The procedure is as follows:

  • The MCU service is the only one in charge of transmitting the different requests to the MCU, either to obtain an information message or to order the configuration of the same for a certain aspect.
  • These requests can come directly from the API (instantiated by some client) or through the Power Manager service because some action has to be taken. In both cases the communication with the MCU service takes place through the middleware layer.
  • The service is then in charge of transmitting the requests (after serializing them through the protobuf library) through the serial port to the MCU. It also has a logic of retries and verification of the correct reception of the message by the MCU.
  • If any error is detected, it will be notified to the corresponding client in the most appropriate way.
  • The API consists of a class that brings together all the logic necessary to receive/request requests through the middleware.
  • From the point of view of the client, the client should only instantiate the API, completely unconcerned about the logic of the operation. You should only provide a handler that you want invoked when your request is processed and a response is received. All the logic of operation of the service is completely abstracted for the user.

Main functionalities

The MCU API provides the following functionalities:

  • Get MCU Device Firmware Version: It allows to get the Firmware Version and other additional information from MCU Device.

  • Update MCU firmware: It allows to update MCU firmware based on binary images stored in the equipment (a mcu_app.zip file located in /mntDAT directory).

  • Get Globally Unique Identifiers (GUID): It allows to get the Part Number, CIDL number and Serial Number from the equipment.

  • Get OBU Working Time: It allows to recover the time OBU has been operating since first time OBU was connected.

    Enable or disable RMDT100 Power Button

    In order to change the state of the RMDT100 Power Button there are several options:

    • Pressing RMDT100 buttons in the following sequence: Button4 -> Button3 -> Button4 will change the state.
    • Using MCU tool to enable Power Button (dpymcutool –enablepb) or disable (dpymcutool –disablepb).

    Both cases will lead to a RMDT100 Led Blink: red when it has been disabled and green when it has been enabled. It is possible to query the state using tool: dpymcutool –getpb.