The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Wed Feb 20 20:53:29 2019 +0000
Revision:
172:65be27845400
Parent:
171:3a7713b1edbc
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 171:3a7713b1edbc 1 /**
AnnaBridge 171:3a7713b1edbc 2 ******************************************************************************
AnnaBridge 171:3a7713b1edbc 3 * @file wdt_map.h
AnnaBridge 171:3a7713b1edbc 4 * @brief WDT HW register map
AnnaBridge 171:3a7713b1edbc 5 * @internal
AnnaBridge 171:3a7713b1edbc 6 * @author ON Semiconductor
AnnaBridge 171:3a7713b1edbc 7 * $Rev: 3283 $
AnnaBridge 171:3a7713b1edbc 8 * $Date: 2015-02-26 18:52:22 +0530 (Thu, 26 Feb 2015) $
AnnaBridge 171:3a7713b1edbc 9 ******************************************************************************
AnnaBridge 171:3a7713b1edbc 10 * Copyright 2016 Semiconductor Components Industries LLC (d/b/a “ON Semiconductor”).
AnnaBridge 171:3a7713b1edbc 11 * All rights reserved. This software and/or documentation is licensed by ON Semiconductor
AnnaBridge 171:3a7713b1edbc 12 * under limited terms and conditions. The terms and conditions pertaining to the software
AnnaBridge 171:3a7713b1edbc 13 * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf
AnnaBridge 171:3a7713b1edbc 14 * (“ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software”) and
AnnaBridge 171:3a7713b1edbc 15 * if applicable the software license agreement. Do not use this software and/or
AnnaBridge 171:3a7713b1edbc 16 * documentation unless you have carefully read and you agree to the limited terms and
AnnaBridge 171:3a7713b1edbc 17 * conditions. By using this software and/or documentation, you agree to the limited
AnnaBridge 171:3a7713b1edbc 18 * terms and conditions.
AnnaBridge 171:3a7713b1edbc 19 *
AnnaBridge 171:3a7713b1edbc 20 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
AnnaBridge 171:3a7713b1edbc 21 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
AnnaBridge 171:3a7713b1edbc 22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
AnnaBridge 171:3a7713b1edbc 23 * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL,
AnnaBridge 171:3a7713b1edbc 24 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
AnnaBridge 171:3a7713b1edbc 25 * @endinternal
AnnaBridge 171:3a7713b1edbc 26 *
AnnaBridge 171:3a7713b1edbc 27 * @ingroup wdt
AnnaBridge 171:3a7713b1edbc 28 *
AnnaBridge 171:3a7713b1edbc 29 * @details
AnnaBridge 171:3a7713b1edbc 30 * <p>
AnnaBridge 171:3a7713b1edbc 31 * Watchdog Timer HW register map description
AnnaBridge 171:3a7713b1edbc 32 * </p>
AnnaBridge 171:3a7713b1edbc 33 *
AnnaBridge 171:3a7713b1edbc 34 */
AnnaBridge 171:3a7713b1edbc 35
AnnaBridge 171:3a7713b1edbc 36 #if defined ( __CC_ARM )
AnnaBridge 171:3a7713b1edbc 37 #pragma anon_unions
AnnaBridge 171:3a7713b1edbc 38 #endif
AnnaBridge 171:3a7713b1edbc 39
AnnaBridge 171:3a7713b1edbc 40 #ifndef WDT_MAP_H_
AnnaBridge 171:3a7713b1edbc 41 #define WDT_MAP_H_
AnnaBridge 171:3a7713b1edbc 42
AnnaBridge 171:3a7713b1edbc 43 #include "architecture.h"
AnnaBridge 171:3a7713b1edbc 44
AnnaBridge 171:3a7713b1edbc 45 typedef struct {
AnnaBridge 171:3a7713b1edbc 46 __IO uint32_t LOAD; /**< 0x4000A000 Contains the value from which the counter is decremented. When this register is written to the count is immediately restarted from the new value. The minimum valid value is 1. */
AnnaBridge 171:3a7713b1edbc 47 __I uint32_t CURRENT_VALUE; /**< 0x4000A004 Gives the current value of the decrementing counter */
AnnaBridge 171:3a7713b1edbc 48 union {
AnnaBridge 171:3a7713b1edbc 49 struct {
AnnaBridge 171:3a7713b1edbc 50 __IO uint32_t WDT_EN :1; /**< Watchdog enable, 0 – Watchdog disabled, 1 – Watchdog enabled */
AnnaBridge 171:3a7713b1edbc 51 } BITS;
AnnaBridge 171:3a7713b1edbc 52 __IO uint32_t WORD;
AnnaBridge 171:3a7713b1edbc 53 } CONTROL; /* 0x4000A008 */
AnnaBridge 171:3a7713b1edbc 54 __O uint32_t KICK; /**< 0x4000A00C A write of any value to this register reloads the value register from the load register */
AnnaBridge 171:3a7713b1edbc 55 __O uint32_t LOCK; /**< 0x4000A010 Use of this register causes write-access to all other registers to be disabled. This is to prevent rogue software from disabling the watchdog functionality. Writing a value of 0x1ACCE551 enables write access to all other registers. Writing any other value disables write access. A read from this register only returns the bottom bit…, 0 – Write access is enabled, 1 – Write access is disabled */
AnnaBridge 171:3a7713b1edbc 56 union {
AnnaBridge 171:3a7713b1edbc 57 struct {
AnnaBridge 171:3a7713b1edbc 58 __I uint32_t WRITE_BUSY_ANY :1; /**< Busy writing any register */
AnnaBridge 171:3a7713b1edbc 59 __I uint32_t WRITE_BUSY_LOAD :1; /**< Busy writing the load register */
AnnaBridge 171:3a7713b1edbc 60 __I uint32_t WRITE_BUSY_CONTROL :1; /**< Busy writing the control enable register */
AnnaBridge 171:3a7713b1edbc 61 __IO uint32_t WRITE_ERROR :1; /**< Error bit. Set when write occurs before previous write completes (busy) */
AnnaBridge 171:3a7713b1edbc 62 } BITS;
AnnaBridge 171:3a7713b1edbc 63 __IO uint32_t WORD;
AnnaBridge 171:3a7713b1edbc 64 } STATUS; /* 0x4000A014 */
AnnaBridge 171:3a7713b1edbc 65 } WdtReg_t, *WdtReg_pt;
AnnaBridge 171:3a7713b1edbc 66 #endif /* WDT_MAP_H_ */