188 lines
6.7 KiB
C
188 lines
6.7 KiB
C
|
/**
|
||
|
* @copyright 2023 indie Semiconductor
|
||
|
*
|
||
|
* This file is proprietary to indie Semiconductor.
|
||
|
* All rights reserved. Reproduction or distribution, in whole
|
||
|
* or in part, is forbidden except by express written permission
|
||
|
* of indie Semiconductor.
|
||
|
*
|
||
|
* @file sysctrla_sfr.h
|
||
|
*/
|
||
|
|
||
|
#ifndef SYSCTRLA_SFR_H__
|
||
|
#define SYSCTRLA_SFR_H__
|
||
|
|
||
|
#include <stdint.h>
|
||
|
|
||
|
/* ------- Start of section using anonymous unions and disabling warnings ------- */
|
||
|
#if defined (__CC_ARM)
|
||
|
#pragma push
|
||
|
#pragma anon_unions
|
||
|
#elif defined (__ICCARM__)
|
||
|
#pragma language=extended
|
||
|
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||
|
#pragma clang diagnostic push
|
||
|
#pragma clang diagnostic ignored "-Wc11-extensions"
|
||
|
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||
|
#elif defined (__GNUC__)
|
||
|
/* anonymous unions are enabled by default */
|
||
|
#elif defined (__TMS470__)
|
||
|
/* anonymous unions are enabled by default */
|
||
|
#elif defined (__TASKING__)
|
||
|
#pragma warning 586
|
||
|
#elif defined (__CSMC__)
|
||
|
/* anonymous unions are enabled by default */
|
||
|
#else
|
||
|
#warning Not supported compiler type
|
||
|
#endif
|
||
|
|
||
|
/**
|
||
|
* @brief A structure to represent Special Function Registers for SYSCTRLA.
|
||
|
*/
|
||
|
typedef struct {
|
||
|
|
||
|
union {
|
||
|
struct {
|
||
|
uint8_t DEBUG_ACCESS_KEY : 8;
|
||
|
uint8_t : 8; /* (reserved) */
|
||
|
uint8_t : 8; /* (reserved) */
|
||
|
uint8_t : 7; /* (reserved) */
|
||
|
uint8_t DEBUG_LOCK : 1;
|
||
|
};
|
||
|
uint32_t WORD;
|
||
|
} DEBUG_ACCESS_KEY; /* +0x000 */
|
||
|
|
||
|
uint8_t DEBUG_ACCESS_ENABLED; /* +0x004 */
|
||
|
uint8_t _RESERVED_05[3]; /* +0x005 */
|
||
|
|
||
|
union {
|
||
|
struct {
|
||
|
uint8_t TRIM_ACCESS_KEY : 8;
|
||
|
uint8_t : 8; /* (reserved) */
|
||
|
uint8_t : 8; /* (reserved) */
|
||
|
uint8_t : 7; /* (reserved) */
|
||
|
uint8_t TRIM_LOCK : 1;
|
||
|
};
|
||
|
uint32_t WORD;
|
||
|
} TRIM_ACCESS_KEY; /* +0x008 */
|
||
|
|
||
|
uint8_t TRIM_ACCESS_ENABLED; /* +0x00C */
|
||
|
uint8_t _RESERVED_0D[3]; /* +0x00D */
|
||
|
|
||
|
union {
|
||
|
struct {
|
||
|
uint8_t PMU_ACCESS_KEY : 8;
|
||
|
uint8_t : 8; /* (reserved) */
|
||
|
uint8_t : 8; /* (reserved) */
|
||
|
uint8_t : 7; /* (reserved) */
|
||
|
uint8_t PMU_LOCK : 1;
|
||
|
};
|
||
|
uint32_t WORD;
|
||
|
} PMU_ACCESS_KEY; /* +0x010 */
|
||
|
|
||
|
uint8_t PMU_ACCESS_ENABLED; /* +0x014 */
|
||
|
uint8_t _RESERVED_15[3]; /* +0x015 */
|
||
|
|
||
|
union {
|
||
|
struct {
|
||
|
uint8_t TRIM_HF_RC : 8; /*!< High Frequency RC Oscillator trim */
|
||
|
uint8_t SSCENA : 1; /*!< SSC Enable */
|
||
|
uint8_t SSCDEEP : 3; /*!< SSC Depth Configuration */
|
||
|
uint8_t : 4; /* (reserved) */
|
||
|
uint8_t SSCDIV : 8; /*!< SSC Clock Divider */
|
||
|
uint8_t : 8; /* (reserved) */
|
||
|
};
|
||
|
uint32_t WORD;
|
||
|
} HF_OSC_TRIM; /* +0x018 */
|
||
|
|
||
|
union {
|
||
|
struct {
|
||
|
uint8_t TRIM_UHF_RC : 8; /*!< Ultra High Frequency RC Oscillator trim */
|
||
|
uint8_t UHFSSCENA : 8; /*!< UHF Oscillator SSC Enable */
|
||
|
uint16_t : 16; /* (reserved) */
|
||
|
};
|
||
|
uint32_t WORD;
|
||
|
} UHF_OSC_TRIM; /* +0x01C */
|
||
|
|
||
|
union {
|
||
|
struct {
|
||
|
uint8_t CSAPOWEN : 1; /*!< Current sensor amplifier enable */
|
||
|
uint8_t CSAZEROEN : 1; /*!< Current sensor amplifier offset measure enable */
|
||
|
uint8_t : 2; /* (reserved) */
|
||
|
uint8_t CSAGBWSEL : 2; /*!< Current sensor amplifier bandwidth select */
|
||
|
uint8_t CSAGAINSEL : 2; /*!< Current sensor amplifier gain select */
|
||
|
uint8_t CSOCPPOWEN : 1; /*!< Current sensor over current protect enable */
|
||
|
uint8_t CSOCPBWSEL : 1; /*!< Current sensor over current protect comparator high bandwidth enable */
|
||
|
uint8_t : 2; /* (reserved) */
|
||
|
uint8_t CSOCPHYSSEL : 2; /*!< Current sensor over current protect comparator hysteresis select */
|
||
|
uint8_t CS_OCP_DAC_POW_EN : 1; /*!< Current sensor DAC enable */
|
||
|
uint8_t : 1; /* (reserved) */
|
||
|
uint8_t CS_OCP_DAC : 8; /*!< Current sensor over current protect threshold level select */
|
||
|
uint8_t CS_OCP_STS : 1; /*!< Current Sensor Over Current Protection Status */
|
||
|
uint8_t : 6; /* (reserved) */
|
||
|
uint8_t CSOCPIE : 1; /*!< Current Sensor Over Current Protection interrupt enable */
|
||
|
};
|
||
|
uint32_t WORD;
|
||
|
} CSACTRLR; /* +0x020 */
|
||
|
|
||
|
union {
|
||
|
struct {
|
||
|
uint8_t DFTCODE : 8;
|
||
|
uint8_t : 8; /* (reserved) */
|
||
|
uint8_t : 8; /* (reserved) */
|
||
|
uint8_t : 7; /* (reserved) */
|
||
|
uint8_t DFT_LOCK : 1;
|
||
|
};
|
||
|
uint32_t WORD;
|
||
|
} DFTCODE; /* +0x024 */
|
||
|
|
||
|
uint8_t DFT_ACCESS_ENABLED; /* +0x028 */
|
||
|
uint8_t _RESERVED_29[3]; /* +0x029 */
|
||
|
|
||
|
union {
|
||
|
struct {
|
||
|
uint8_t : 1; /* (reserved) */
|
||
|
uint8_t FLASHTESTMODESTART : 1;
|
||
|
uint8_t FLASHOSCTESTMODESTART : 1;
|
||
|
uint8_t SRAMBISTMODESTART : 1;
|
||
|
uint8_t : 4; /* (reserved) */
|
||
|
uint32_t : 24; /* (reserved) */
|
||
|
};
|
||
|
uint32_t WORD;
|
||
|
} DFTTESTMODESTART; /* +0x02C */
|
||
|
|
||
|
uint32_t NAME; /*<! ASIC name +0x030 */
|
||
|
|
||
|
uint16_t REV; /*<! Silicon Revision +0x034 */
|
||
|
uint8_t _RESERVED_36[2]; /* +0x036 */
|
||
|
|
||
|
} SYSCTRLA_SFRS_t;
|
||
|
|
||
|
/* -------- End of section using anonymous unions and disabling warnings -------- */
|
||
|
#if defined (__CC_ARM)
|
||
|
#pragma pop
|
||
|
#elif defined (__ICCARM__)
|
||
|
/* leave anonymous unions enabled */
|
||
|
#elif (__ARMCC_VERSION >= 6010050)
|
||
|
#pragma clang diagnostic pop
|
||
|
#elif defined (__GNUC__)
|
||
|
/* anonymous unions are enabled by default */
|
||
|
#elif defined (__TMS470__)
|
||
|
/* anonymous unions are enabled by default */
|
||
|
#elif defined (__TASKING__)
|
||
|
#pragma warning restore
|
||
|
#elif defined (__CSMC__)
|
||
|
/* anonymous unions are enabled by default */
|
||
|
#else
|
||
|
#warning Not supported compiler type
|
||
|
#endif
|
||
|
|
||
|
/**
|
||
|
* @brief The starting address of SYSCTRLA SFRS.
|
||
|
*/
|
||
|
#define SYSCTRLA_SFRS ((__IO SYSCTRLA_SFRS_t *)0x40000800)
|
||
|
|
||
|
#endif /* end of __SYSCTRLA_SFR_H__ section */
|
||
|
|
||
|
|