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