text: /* --COPYRIGHT--,BSD
   * Copyright (c) 2017, Texas Instruments Incorporated
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * *  Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * *  Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in the
   *    documentation and/or other materials provided with the distribution.
   *
   * *  Neither the name of Texas Instruments Incorporated nor the names of
   *    its contributors may be used to endorse or promote products derived
   *    from this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
   * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
   * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
   * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
   * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
   * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   * --/COPYRIGHT--*/
  /*******************************************************************************
   * MSP432 Timer32 - Free Run One Shot
   *
   * Description: In this very simple code example, one of the Timer32 modules
   * is setup in 32-bit free-run mode and started in one shot mode. This means
   * that the timer starts at UINT32_MAX (0xFFFFFFFF) and runs to 0 . Once
   * the timer reaches zero, it halts (one shot). The Timer32 is sourced
   * by MCLK and in this example is configured to have a prescaler of 256 every
   * one tick of the Timer32 module is 256 ticks of MCLK).
   *
   *                MSP432P4111
   *             ------------------
   *         /|\|                  |
   *          | |                  |
   *          --|RST               |
   *            |                  |
   *            |                  |
   *            |                  |
   *            |                  |
   *            |                  |
   *
   ******************************************************************************/
  /* DriverLib Includes */
  #include <ti/devices/msp432p4xx/driverlib/driverlib.h>
  
  /* Standard Includes */
  #include <stdint.h>
  #include <stdbool.h>
  
  volatile uint32_t curValue;
  
  //![Simple Timer32 Example]
  int main(void)
  {
      /* Holding the Watchdog */
      MAP_WDT_A_holdTimer();
  
      /* Initializing Timer32 in module in 32-bit free-run mode (with max value
       * of 0xFFFFFFFF
       */
      MAP_Timer32_initModule(TIMER32_BASE, TIMER32_PRESCALER_256, TIMER32_32BIT,
              TIMER32_FREE_RUN_MODE);
  
      /* Starting the timer */
      MAP_Timer32_startTimer(TIMER32_BASE, true);
  
      while(1)
      {
          /* Getting the current value of the Timer32 */
          curValue = MAP_Timer32_getValue(TIMER32_BASE);
      }
  }
  //![Simple Timer32 Example]
  