Rapidm2m-c3xx-base: Shutdown Handling

Hello rapidM2M Community,

the rapidm2m-c3xx-base library now includes a shutdown handling procedure, that handles supply voltage failures.

The library provides several functions so you can configure the shutdown handling procedure, depending on your specific use case.

If you just want to use the basic rapidM2M-C3xx-base shutdown handling, without any callbacks and specific configuration, just call C3_Init() in your rapidM2M C3xx project. This will ensure that the rapidM2M C3xx will safely shutdown in case of supply voltage failure.


  • In the event of a supply voltage failure the supply of the rapidM2M C3xx is switched to the rechargeable buffer battery. This is done automatically as soon as the supply voltage falls below 8,65V.
  • The switch to the rechargeable buffer battery is detected by the library and the shutdown handling procedure is started.
  • If the supply voltage increases to above 8,65V again the shutdown procedure is stopped again.
  • Several callbacks are provided, which inform the application about the different shutdown handling procedure states.

Shutdown Handling procedure:

  1. When the supply is switched to the rechargeable buffer battery the application is notified via an optional callback to indicate that a supply voltage failure was detected.
  2. A configurable outage timeout is started.
  3. If the outage timeout expires the application is notified via an optional callback.
  4. If the outage timeout has expired, it is recommended to generate an alarm/warning and trigger an uplink synchronization to inform the server about the supply voltage failure.
  5. After that, a configurable shutdown timeout is started. During this phase it is recommended to terminate a possibly active connection and shutdown down the rapidM2M C3xx.
  6. If the shutdown timeout has also expired, the library switches to the interval-based uplink mode and waits until a possibly active connection is terminated, or a fixed timeout of 120 seconds is expired.
  7. Finally, if the supply voltage is still below 8,65V, the library closes all interfaces (CAN, RS232 and RS485) and shuts down the rapidM2M C3xx.

Kind regards

Microtronics Engineering