EL4121 Embedded System / mbed-os

Dependents:   cobaLCDJoyMotor_Thread odometry_omni_3roda_v3 odometry_omni_3roda_v1 odometry_omni_3roda_v2 ... more

Committer:
be_bryan
Date:
Mon Dec 11 17:54:04 2017 +0000
Revision:
0:b74591d5ab33
motor ++

Who changed what in which revision?

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