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:
Thu Nov 08 11:45:42 2018 +0000
Revision:
171:3a7713b1edbc
Parent:
TARGET_MAX32625PICO/TARGET_Maxim/TARGET_MAX32625/device/trim_regs.h@169:a7c7b631e539
mbed library. Release version 164

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Anna Bridge 169:a7c7b631e539 1 /*******************************************************************************
Anna Bridge 169:a7c7b631e539 2 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
Anna Bridge 169:a7c7b631e539 3 *
Anna Bridge 169:a7c7b631e539 4 * Permission is hereby granted, free of charge, to any person obtaining a
Anna Bridge 169:a7c7b631e539 5 * copy of this software and associated documentation files (the "Software"),
Anna Bridge 169:a7c7b631e539 6 * to deal in the Software without restriction, including without limitation
Anna Bridge 169:a7c7b631e539 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Anna Bridge 169:a7c7b631e539 8 * and/or sell copies of the Software, and to permit persons to whom the
Anna Bridge 169:a7c7b631e539 9 * Software is furnished to do so, subject to the following conditions:
Anna Bridge 169:a7c7b631e539 10 *
Anna Bridge 169:a7c7b631e539 11 * The above copyright notice and this permission notice shall be included
Anna Bridge 169:a7c7b631e539 12 * in all copies or substantial portions of the Software.
Anna Bridge 169:a7c7b631e539 13 *
Anna Bridge 169:a7c7b631e539 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Anna Bridge 169:a7c7b631e539 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Anna Bridge 169:a7c7b631e539 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Anna Bridge 169:a7c7b631e539 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
Anna Bridge 169:a7c7b631e539 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Anna Bridge 169:a7c7b631e539 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Anna Bridge 169:a7c7b631e539 20 * OTHER DEALINGS IN THE SOFTWARE.
Anna Bridge 169:a7c7b631e539 21 *
Anna Bridge 169:a7c7b631e539 22 * Except as contained in this notice, the name of Maxim Integrated
Anna Bridge 169:a7c7b631e539 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
Anna Bridge 169:a7c7b631e539 24 * Products, Inc. Branding Policy.
Anna Bridge 169:a7c7b631e539 25 *
Anna Bridge 169:a7c7b631e539 26 * The mere transfer of this software does not imply any licenses
Anna Bridge 169:a7c7b631e539 27 * of trade secrets, proprietary technology, copyrights, patents,
Anna Bridge 169:a7c7b631e539 28 * trademarks, maskwork rights, or any other form of intellectual
Anna Bridge 169:a7c7b631e539 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
Anna Bridge 169:a7c7b631e539 30 * ownership rights.
Anna Bridge 169:a7c7b631e539 31 ******************************************************************************/
Anna Bridge 169:a7c7b631e539 32
Anna Bridge 169:a7c7b631e539 33 #ifndef _MXC_TRIM_REGS_H_
Anna Bridge 169:a7c7b631e539 34 #define _MXC_TRIM_REGS_H_
Anna Bridge 169:a7c7b631e539 35
Anna Bridge 169:a7c7b631e539 36 #ifdef __cplusplus
Anna Bridge 169:a7c7b631e539 37 extern "C" {
Anna Bridge 169:a7c7b631e539 38 #endif
Anna Bridge 169:a7c7b631e539 39
Anna Bridge 169:a7c7b631e539 40 #include <stdint.h>
Anna Bridge 169:a7c7b631e539 41 #include "mxc_device.h"
Anna Bridge 169:a7c7b631e539 42
Anna Bridge 169:a7c7b631e539 43 /*
Anna Bridge 169:a7c7b631e539 44 If types are not defined elsewhere (CMSIS) define them here
Anna Bridge 169:a7c7b631e539 45 */
Anna Bridge 169:a7c7b631e539 46 #ifndef __IO
Anna Bridge 169:a7c7b631e539 47 #define __IO volatile
Anna Bridge 169:a7c7b631e539 48 #endif
Anna Bridge 169:a7c7b631e539 49 #ifndef __I
Anna Bridge 169:a7c7b631e539 50 #define __I volatile const
Anna Bridge 169:a7c7b631e539 51 #endif
Anna Bridge 169:a7c7b631e539 52 #ifndef __O
Anna Bridge 169:a7c7b631e539 53 #define __O volatile
Anna Bridge 169:a7c7b631e539 54 #endif
Anna Bridge 169:a7c7b631e539 55
Anna Bridge 169:a7c7b631e539 56
Anna Bridge 169:a7c7b631e539 57 /*
Anna Bridge 169:a7c7b631e539 58 Typedefed structure(s) for module registers (per instance or section) with direct 32-bit
Anna Bridge 169:a7c7b631e539 59 access to each register in module.
Anna Bridge 169:a7c7b631e539 60 */
Anna Bridge 169:a7c7b631e539 61
Anna Bridge 169:a7c7b631e539 62 /* Offset Register Description
Anna Bridge 169:a7c7b631e539 63 ============= ============================================================================ */
Anna Bridge 169:a7c7b631e539 64 typedef struct {
Anna Bridge 169:a7c7b631e539 65 __I uint32_t rsv000[10]; /* 0x0000-0x0024 */
Anna Bridge 169:a7c7b631e539 66 __IO uint32_t reg10_mem_size; /* 0x0028 Shadow Trim for Flash and SRAM Memory Size */
Anna Bridge 169:a7c7b631e539 67 __IO uint32_t reg11_adc_trim0; /* 0x002C Shadow Trim for ADC R0 */
Anna Bridge 169:a7c7b631e539 68 __IO uint32_t reg12_adc_trim1; /* 0x0030 Shadow Trim for ADC R1 */
Anna Bridge 169:a7c7b631e539 69 __IO uint32_t for_pwr_reg5; /* 0x0034 Shadow Trim for PWRSEQ Register REG5 */
Anna Bridge 169:a7c7b631e539 70 __IO uint32_t for_pwr_reg6; /* 0x0038 Shadow Trim for PWRSEQ Register REG6 */
Anna Bridge 169:a7c7b631e539 71 __IO uint32_t for_pwr_reg7; /* 0x003C Shadow Trim for PWRSEQ Register REG7 */
Anna Bridge 169:a7c7b631e539 72 } mxc_trim_regs_t;
Anna Bridge 169:a7c7b631e539 73
Anna Bridge 169:a7c7b631e539 74
Anna Bridge 169:a7c7b631e539 75 /*
Anna Bridge 169:a7c7b631e539 76 Register offsets for module TRIM.
Anna Bridge 169:a7c7b631e539 77 */
Anna Bridge 169:a7c7b631e539 78
Anna Bridge 169:a7c7b631e539 79 #define MXC_R_TRIM_OFFS_REG10_MEM_SIZE ((uint32_t)0x00000028UL)
Anna Bridge 169:a7c7b631e539 80 #define MXC_R_TRIM_OFFS_REG11_ADC_TRIM0 ((uint32_t)0x0000002CUL)
Anna Bridge 169:a7c7b631e539 81 #define MXC_R_TRIM_OFFS_REG12_ADC_TRIM1 ((uint32_t)0x00000030UL)
Anna Bridge 169:a7c7b631e539 82 #define MXC_R_TRIM_OFFS_FOR_PWR_REG5 ((uint32_t)0x00000034UL)
Anna Bridge 169:a7c7b631e539 83 #define MXC_R_TRIM_OFFS_FOR_PWR_REG6 ((uint32_t)0x00000038UL)
Anna Bridge 169:a7c7b631e539 84 #define MXC_R_TRIM_OFFS_FOR_PWR_REG7 ((uint32_t)0x0000003CUL)
Anna Bridge 169:a7c7b631e539 85
Anna Bridge 169:a7c7b631e539 86
Anna Bridge 169:a7c7b631e539 87 /*
Anna Bridge 169:a7c7b631e539 88 Field positions and masks for module TRIM.
Anna Bridge 169:a7c7b631e539 89 */
Anna Bridge 169:a7c7b631e539 90
Anna Bridge 169:a7c7b631e539 91 #define MXC_F_TRIM_REG10_MEM_SIZE_SRAM_POS 0
Anna Bridge 169:a7c7b631e539 92 #define MXC_F_TRIM_REG10_MEM_SIZE_SRAM ((uint32_t)(0x00000003UL << MXC_F_TRIM_REG10_MEM_SIZE_SRAM_POS))
Anna Bridge 169:a7c7b631e539 93 #define MXC_F_TRIM_REG10_MEM_SIZE_FLASH_POS 2
Anna Bridge 169:a7c7b631e539 94 #define MXC_F_TRIM_REG10_MEM_SIZE_FLASH ((uint32_t)(0x00000007UL << MXC_F_TRIM_REG10_MEM_SIZE_FLASH_POS))
Anna Bridge 169:a7c7b631e539 95
Anna Bridge 169:a7c7b631e539 96 #define MXC_V_TRIM_REG10_MEM_SRAM_FULL_SIZE ((uint32_t)(0x00000000UL))
Anna Bridge 169:a7c7b631e539 97 #define MXC_V_TRIM_REG10_MEM_SRAM_THREE_FOURTHS_SIZE ((uint32_t)(0x00000001UL))
Anna Bridge 169:a7c7b631e539 98 #define MXC_V_TRIM_REG10_MEM_SRAM_HALF_SIZE ((uint32_t)(0x00000002UL))
Anna Bridge 169:a7c7b631e539 99
Anna Bridge 169:a7c7b631e539 100 #define MXC_V_TRIM_REG10_MEM_FLASH_FULL_SIZE ((uint32_t)(0x00000000UL))
Anna Bridge 169:a7c7b631e539 101 #define MXC_V_TRIM_REG10_MEM_FLASH_THREE_FOURTHS_SIZE ((uint32_t)(0x00000001UL))
Anna Bridge 169:a7c7b631e539 102 #define MXC_V_TRIM_REG10_MEM_FLASH_HALF_SIZE ((uint32_t)(0x00000002UL))
Anna Bridge 169:a7c7b631e539 103 #define MXC_V_TRIM_REG10_MEM_FLASH_THREE_EIGHTHS_SIZE ((uint32_t)(0x00000003UL))
Anna Bridge 169:a7c7b631e539 104 #define MXC_V_TRIM_REG10_MEM_FLASH_FOURTH_SIZE ((uint32_t)(0x00000004UL))
Anna Bridge 169:a7c7b631e539 105
Anna Bridge 169:a7c7b631e539 106 #define MXC_F_TRIM_REG11_ADC_TRIM0_ADCTRIM_X0R0_POS 0
Anna Bridge 169:a7c7b631e539 107 #define MXC_F_TRIM_REG11_ADC_TRIM0_ADCTRIM_X0R0 ((uint32_t)(0x000003FFUL << MXC_F_TRIM_REG11_ADC_TRIM0_ADCTRIM_X0R0_POS))
Anna Bridge 169:a7c7b631e539 108 #define MXC_F_TRIM_REG11_ADC_TRIM0_ADCTRIM_X1R0_POS 16
Anna Bridge 169:a7c7b631e539 109 #define MXC_F_TRIM_REG11_ADC_TRIM0_ADCTRIM_X1R0 ((uint32_t)(0x000003FFUL << MXC_F_TRIM_REG11_ADC_TRIM0_ADCTRIM_X1R0_POS))
Anna Bridge 169:a7c7b631e539 110
Anna Bridge 169:a7c7b631e539 111 #define MXC_F_TRIM_REG12_ADC_TRIM1_ADCTRIM_X0R1_POS 0
Anna Bridge 169:a7c7b631e539 112 #define MXC_F_TRIM_REG12_ADC_TRIM1_ADCTRIM_X0R1 ((uint32_t)(0x000003FFUL << MXC_F_TRIM_REG12_ADC_TRIM1_ADCTRIM_X0R1_POS))
Anna Bridge 169:a7c7b631e539 113 #define MXC_F_TRIM_REG12_ADC_TRIM1_ADCTRIM_X1R1_POS 16
Anna Bridge 169:a7c7b631e539 114 #define MXC_F_TRIM_REG12_ADC_TRIM1_ADCTRIM_X1R1 ((uint32_t)(0x000003FFUL << MXC_F_TRIM_REG12_ADC_TRIM1_ADCTRIM_X1R1_POS))
Anna Bridge 169:a7c7b631e539 115 #define MXC_F_TRIM_REG12_ADC_TRIM1_ADCTRIM_DC_POS 28
Anna Bridge 169:a7c7b631e539 116 #define MXC_F_TRIM_REG12_ADC_TRIM1_ADCTRIM_DC ((uint32_t)(0x0000000FUL << MXC_F_TRIM_REG12_ADC_TRIM1_ADCTRIM_DC_POS))
Anna Bridge 169:a7c7b631e539 117
Anna Bridge 169:a7c7b631e539 118
Anna Bridge 169:a7c7b631e539 119
Anna Bridge 169:a7c7b631e539 120 #ifdef __cplusplus
Anna Bridge 169:a7c7b631e539 121 }
Anna Bridge 169:a7c7b631e539 122 #endif
Anna Bridge 169:a7c7b631e539 123
Anna Bridge 169:a7c7b631e539 124 #endif /* _MXC_TRIM_REGS_H_ */
Anna Bridge 169:a7c7b631e539 125