Skip to content

Commit 66d5101

Browse files
authored
Merge pull request #5727 from rtthread-bot/rtt_bot
2 parents 84e18bb + 6330720 commit 66d5101

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+28793
-2
lines changed

bsp/v85xxp/.ignore_format.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# files format check exclude path, please follow the instructions below to modify;
2+
# If you need to exclude an entire folder, add the folder path in dir_path;
3+
# If you need to exclude a file, add the path to the file in file_path.
4+
5+
dir_path:
6+
- Libraries/VangoV85xxP_standard_peripheral

bsp/v85xxp/Kconfig

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
mainmenu "RT-Thread Configuration"
2+
3+
config BSP_DIR
4+
string
5+
option env="BSP_ROOT"
6+
default "."
7+
8+
config RTT_DIR
9+
string
10+
option env="RTT_ROOT"
11+
default "../.."
12+
13+
# you can change the RTT_ROOT default: "rt-thread"
14+
# example : default "F:/git_repositories/rt-thread"
15+
16+
config PKGS_DIR
17+
string
18+
option env="PKGS_ROOT"
19+
default "packages"
20+
21+
source "$RTT_DIR/Kconfig"
22+
source "$PKGS_DIR/Kconfig"
23+
24+
config SOC_SERIES_V85XXP
25+
bool
26+
default y
27+
28+
config SOC_V85XXP
29+
bool
30+
select RT_USING_COMPONENTS_INIT
31+
select RT_USING_USER_MAIN
32+
select SOC_SERIES_V85XXP
33+
default y
34+
35+
menu "On-chip Peripheral Drivers"
36+
menuconfig BSP_USING_UART
37+
bool "Enable UART"
38+
default y
39+
select RT_USING_SERIAL
40+
if BSP_USING_UART
41+
config BSP_USING_UART0
42+
bool "using uart0"
43+
default n
44+
config BSP_USING_UART1
45+
bool "using uart1"
46+
default n
47+
config BSP_USING_UART2
48+
bool "using uart2"
49+
default y
50+
config BSP_USING_UART3
51+
bool "using uart3"
52+
default n
53+
config BSP_USING_UART4
54+
bool "using uart4"
55+
default n
56+
config BSP_USING_UART5
57+
bool "using uart5"
58+
default n
59+
endif
60+
menuconfig BSP_USING_ADC
61+
bool "Enable ADC"
62+
default n
63+
select RT_USING_ADC
64+
if BSP_USING_ADC
65+
config BSP_USING_ADC0
66+
bool "using adc0"
67+
default n
68+
endif
69+
menuconfig BSP_USING_HWTIMER
70+
bool "Enable hwtimer"
71+
default n
72+
select RT_USING_HWTIMER
73+
if BSP_USING_HWTIMER
74+
config BSP_USING_HWTIMER0
75+
bool "using hwtimer0"
76+
default n
77+
config BSP_USING_HWTIMER1
78+
bool "using hwtimer1"
79+
default n
80+
config BSP_USING_HWTIMER2
81+
bool "using hwtimer2"
82+
default n
83+
config BSP_USING_HWTIMER3
84+
bool "using hwtimer3"
85+
default n
86+
endif
87+
config BSP_USING_WDT
88+
bool "Enable Watchdog Timer"
89+
select RT_USING_WDT
90+
default n
91+
92+
config BSP_USING_RTC
93+
bool "using internal rtc"
94+
default n
95+
select RT_USING_RTC
96+
97+
endmenu
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
******************************************************************************
3+
* @file lib_CodeRAM.h
4+
* @author Application Team
5+
* @version V1.1.0
6+
* @date 2019-10-28
7+
* @brief Codes executed in SRAM.
8+
******************************************************************************
9+
* @attention
10+
*
11+
******************************************************************************
12+
*/
13+
14+
#ifndef __LIB_CODERAM_H
15+
#define __LIB_CODERAM_H
16+
17+
#ifdef __cplusplus
18+
extern "C" {
19+
#endif
20+
21+
/* Includes ------------------------------------------------------------------*/
22+
#include "target.h"
23+
24+
#ifndef __GNUC__
25+
26+
#ifdef __ICCARM__ /* EWARM */
27+
#define __RAM_FUNC __ramfunc
28+
#endif
29+
30+
#ifdef __CC_ARM /* MDK-ARM */
31+
#define __RAM_FUNC __attribute__((used))
32+
#endif
33+
34+
/* Exported Functions ------------------------------------------------------- */
35+
36+
__RAM_FUNC void PMU_EnterIdle_FlashDSTB(void);
37+
38+
#endif /* __GNUC__ */
39+
40+
#ifdef __cplusplus
41+
}
42+
#endif
43+
44+
#endif /* __LIB_CODERAM_H */
45+
46+
/*********************************** END OF FILE ******************************/
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
/**
2+
******************************************************************************
3+
* @file lib_LoadNVR.h
4+
* @author Application Team
5+
* @version V1.1.0
6+
* @date 2019-10-28
7+
* @brief Load information from NVR.
8+
******************************************************************************
9+
* @attention
10+
*
11+
******************************************************************************
12+
*/
13+
14+
#ifndef __LIB_LOADNVR_H
15+
#define __LIB_LOADNVR_H
16+
17+
#ifdef __cplusplus
18+
extern "C" {
19+
#endif
20+
21+
/* Includes ------------------------------------------------------------------*/
22+
#include "target.h"
23+
24+
/* Power Measure Result */
25+
typedef struct
26+
{
27+
uint32_t AVCCMEAResult; // LDO33 Measure Result
28+
uint32_t DVCCMEAResult; // LDO15 Measure Result
29+
uint32_t BGPMEAResult; // BGP Measure Result
30+
uint32_t RCLMEAResult; // RCL Measure Result
31+
uint32_t RCHMEAResult; // RCH Measure Result
32+
} NVR_MISCGain;
33+
34+
/* Chip ID */
35+
typedef struct
36+
{
37+
uint32_t ChipID0; // ID word 0
38+
uint32_t ChipID1; // ID word 1
39+
} NVR_CHIPID;
40+
41+
/* Temperature information */
42+
typedef struct
43+
{
44+
float TempOffset;
45+
} NVR_TEMPINFO;
46+
47+
/* LCD information */
48+
typedef struct
49+
{
50+
uint32_t MEALCDLDO; // Measure LCD LDO pre trim value
51+
uint32_t MEALCDVol; // VLCD setting
52+
} NVR_LCDINFO;
53+
54+
/* RTC(temp) information */
55+
typedef struct
56+
{
57+
int16_t RTCTempP0; //P0
58+
int16_t RTCTempP1; //P1
59+
int32_t RTCTempP2; //P2
60+
int16_t RTCTempP4; //P4
61+
int16_t RTCTempP5; //P5
62+
int16_t RTCTempP6; //P6
63+
int16_t RTCTempP7; //P7
64+
int16_t RTCTempK0; //K0
65+
int16_t RTCTempK1; //K1
66+
int16_t RTCTempK2; //K2
67+
int16_t RTCTempK3; //K3
68+
int16_t RTCTempK4; //K4
69+
int16_t RTCACTI; //Center temperature
70+
uint32_t RTCACKTemp; //section X temperature
71+
int32_t RTCTempDelta; //Temperature delta
72+
uint32_t RTCACF200; //RTC_ACF200
73+
} NVR_RTCINFO;
74+
75+
/* RTC(temp) information */
76+
typedef struct
77+
{
78+
int16_t RTCTempP0; //P0
79+
int16_t RTCTempP1; //P1
80+
int32_t RTCTempP2; //P2
81+
} NVR_TempParams;
82+
83+
/* ADC Voltage Parameters */
84+
typedef struct
85+
{
86+
float aParameter;
87+
float bParameter;
88+
float OffsetParameter;
89+
} NVR_ADCVOLPARA;
90+
//Mode
91+
#define NVR_3V_EXTERNAL_NODIV (0x000UL) // Power supply: 3.3V; Channel: External; Divider modeL: None
92+
#define NVR_3V_EXTERNAL_RESDIV (0x001UL) // Power supply: 3.3V; Channel: External; Divider modeL: Resistive
93+
#define NVR_3V_BAT1_RESDIV (0x002UL) // Power supply: 3.3V; Channel: VDD; Divider modeL: Resistive
94+
#define NVR_3V_BATRTC_RESDIV (0x003UL) // Power supply: 3.3V; Channel: BATRTC; Divider modeL: Resistive
95+
#define NVR_5V_EXTERNAL_NODIV (0x100UL) // Power supply: 5V; Channel: External; Divider modeL: None
96+
#define NVR_5V_EXTERNAL_RESDIV (0x101UL) // Power supply: 5V; Channel: External; Divider modeL: Resistive
97+
#define NVR_5V_BAT1_RESDIV (0x102UL) // Power supply: 5V; Channel: VDD; Divider modeL: Resistive
98+
#define NVR_5V_BATRTC_RESDIV (0x103UL) // Power supply: 5V; Channel: BATRTC; Divider modeL: Resistive
99+
#define IS_NVR_ADCVOL_MODE(__MODE__) (((__MODE__) == NVR_3V_EXTERNAL_NODIV) ||\
100+
((__MODE__) == NVR_3V_EXTERNAL_RESDIV) ||\
101+
((__MODE__) == NVR_3V_BAT1_RESDIV) ||\
102+
((__MODE__) == NVR_3V_BATRTC_RESDIV) ||\
103+
((__MODE__) == NVR_5V_EXTERNAL_NODIV) ||\
104+
((__MODE__) == NVR_5V_EXTERNAL_RESDIV) ||\
105+
((__MODE__) == NVR_5V_BAT1_RESDIV) ||\
106+
((__MODE__) == NVR_5V_BATRTC_RESDIV))
107+
108+
//VOLMode
109+
#define NVR_MEARES_3V 0
110+
#define NVR_MEARES_5V 1
111+
#define IS_MEARES(__VOLMODE__) (((__VOLMODE__) == NVR_MEARES_3V) ||\
112+
((__VOLMODE__) == NVR_MEARES_5V))
113+
/********** NVR Address **********/
114+
//ADC Voltage Parameters
115+
#define NVR_3VPARA_BASEADDR1 (__IO uint32_t *)(0x80C48)
116+
#define NVR_3VPARA_BASEADDR2 (__IO uint32_t *)(0x80C6C)
117+
#define NVR_5VPARA_BASEADDR1 (__IO uint32_t *)(0x80C00)
118+
#define NVR_5VPARA_BASEADDR2 (__IO uint32_t *)(0x80C24)
119+
//RTC DATA
120+
//P4
121+
#define NVR_RTC1_P4 (__IO uint32_t *)(0x80800)
122+
#define NVR_RTC1_P4_CHKSUM (__IO uint32_t *)(0x80804)
123+
#define NVR_RTC2_P4 (__IO uint32_t *)(0x80808)
124+
#define NVR_RTC2_P4_CHKSUM (__IO uint32_t *)(0x8080C)
125+
//ACK1~ACK5
126+
#define NVR_RTC1_ACK0 (__IO uint32_t *)(0x80810)
127+
#define NVR_RTC1_ACK1 (__IO uint32_t *)(0x80814)
128+
#define NVR_RTC1_ACK2 (__IO uint32_t *)(0x80818)
129+
#define NVR_RTC1_ACK3 (__IO uint32_t *)(0x8081C)
130+
#define NVR_RTC1_ACK4 (__IO uint32_t *)(0x80820)
131+
#define NVR_RTC1_ACK_CHKSUM (__IO uint32_t *)(0x80824)
132+
#define NVR_RTC2_ACK0 (__IO uint32_t *)(0x80828)
133+
#define NVR_RTC2_ACK1 (__IO uint32_t *)(0x8082C)
134+
#define NVR_RTC2_ACK2 (__IO uint32_t *)(0x80830)
135+
#define NVR_RTC2_ACK3 (__IO uint32_t *)(0x80834)
136+
#define NVR_RTC2_ACK4 (__IO uint32_t *)(0x80838)
137+
#define NVR_RTC2_ACK_CHKSUM (__IO uint32_t *)(0x8083C)
138+
//ACTI
139+
#define NVR_RTC1_ACTI (__IO uint32_t *)(0x80840)
140+
#define NVR_RTC1_ACTI_CHKSUM (__IO uint32_t *)(0x80844)
141+
#define NVR_RTC2_ACTI (__IO uint32_t *)(0x80848)
142+
#define NVR_RTC2_ACTI_CHKSUM (__IO uint32_t *)(0x8084C)
143+
//ACKTEMP
144+
#define NVR_RTC1_ACKTEMP (__IO uint32_t *)(0x80850)
145+
#define NVR_RTC1_ACKTEMP_CHKSUM (__IO uint32_t *)(0x80854)
146+
#define NVR_RTC2_ACKTEMP (__IO uint32_t *)(0x80858)
147+
#define NVR_RTC2_ACKTEMP_CHKSUM (__IO uint32_t *)(0x8085C)
148+
//Analog trim data
149+
#define NVR_ANA_TRIMDATA1 (__IO uint32_t *)(0x80DC0)
150+
#define NVR_ANA_OPREG1 (__IO uint32_t *)(0x80DC4)
151+
#define NVR_ANA_KEYREG1 (__IO uint32_t *)(0x80DC8)
152+
#define NVR_ANA_CHECKSUM1 (__IO uint32_t *)(0x80DCC)
153+
#define NVR_ANA_TRIMDATA2 (__IO uint32_t *)(0x80DD0)
154+
#define NVR_ANA_OPREG2 (__IO uint32_t *)(0x80DD4)
155+
#define NVR_ANA_KEYREG2 (__IO uint32_t *)(0x80DD8)
156+
#define NVR_ANA_CHECKSUM2 (__IO uint32_t *)(0x80DDC)
157+
#define NVR_ANA1_REG10 (__IO uint32_t *)(0x80DE0)
158+
#define NVR_ANA1_REG10_CHKSUM (__IO uint32_t *)(0x80DE4)
159+
#define NVR_ANA2_REG10 (__IO uint32_t *)(0x80DE8)
160+
#define NVR_ANA2_REG10_CHKSUM (__IO uint32_t *)(0x80DEC)
161+
//ADC_CHx
162+
#define NVR_5VADCCHx_NODIV1 (__IO uint32_t *)(0x80C90)
163+
#define NVR_5VADCCHx_RESDIV1 (__IO uint32_t *)(0x80C94)
164+
#define NVR_5VADCCHx_NODIV2 (__IO uint32_t *)(0x80CA4)
165+
#define NVR_5VADCCHx_RESDIV2 (__IO uint32_t *)(0x80CA8)
166+
#define NVR_3VADCCHx_NODIV1 (__IO uint32_t *)(0x80CB8)
167+
#define NVR_3VADCCHx_RESDIV1 (__IO uint32_t *)(0x80CBC)
168+
#define NVR_3VADCCHx_NODIV2 (__IO uint32_t *)(0x80CCC)
169+
#define NVR_3VADCCHx_RESDIV2 (__IO uint32_t *)(0x80CD0)
170+
//BAT Measure Result
171+
#define NVR_5VBAT1 (__IO uint32_t *)(0x80C98)
172+
#define NVR_5VBATRTC1 (__IO uint32_t *)(0x80C9C)
173+
#define NVR_5VBATCHKSUM1 (__IO uint32_t *)(0x80CA0)
174+
#define NVR_5VBAT2 (__IO uint32_t *)(0x80CAC)
175+
#define NVR_5VBATRTC2 (__IO uint32_t *)(0x80CB0)
176+
#define NVR_5VBATCHKSUM2 (__IO uint32_t *)(0x80CB4)
177+
#define NVR_3VBAT1 (__IO uint32_t *)(0x80CC0)
178+
#define NVR_3VBATRTC1 (__IO uint32_t *)(0x80CC4)
179+
#define NVR_3VBATCHKSUM1 (__IO uint32_t *)(0x80CC8)
180+
#define NVR_3VBAT2 (__IO uint32_t *)(0x80CD4)
181+
#define NVR_3VBATRTC2 (__IO uint32_t *)(0x80CD8)
182+
#define NVR_3VBATCHKSUM2 (__IO uint32_t *)(0x80CDC)
183+
//RTC AutoCal Px pramameters
184+
#define NVR_RTC1_P1_P0 (__IO uint32_t *)(0x80D10)
185+
#define NVR_RTC1_P2 (__IO uint32_t *)(0x80D14)
186+
#define NVR_RTC1_P5_P4 (__IO uint32_t *)(0x80D18)
187+
#define NVR_RTC1_P7_P6 (__IO uint32_t *)(0x80D1C)
188+
#define NVR_RTC1_PCHECHSUM (__IO uint32_t *)(0x80D20)
189+
#define NVR_RTC2_P1_P0 (__IO uint32_t *)(0x80D24)
190+
#define NVR_RTC2_P2 (__IO uint32_t *)(0x80D28)
191+
#define NVR_RTC2_P5_P4 (__IO uint32_t *)(0x80D2C)
192+
#define NVR_RTC2_P7_P6 (__IO uint32_t *)(0x80D30)
193+
#define NVR_RTC2_PCHECHSUM (__IO uint32_t *)(0x80D34)
194+
//Power Measure Result
195+
#define NVR_AVCC_MEA1 (__IO uint32_t *)(0x80D38)
196+
#define NVR_DVCC_MEA1 (__IO uint32_t *)(0x80D3C)
197+
#define NVR_BGP_MEA1 (__IO uint32_t *)(0x80D40)
198+
#define NVR_RCL_MEA1 (__IO uint32_t *)(0x80D44)
199+
#define NVR_RCH_MEA1 (__IO uint32_t *)(0x80D48)
200+
#define NVR_PWR_CHECKSUM1 (__IO uint32_t *)(0x80D4C)
201+
#define NVR_AVCC_MEA2 (__IO uint32_t *)(0x80D50)
202+
#define NVR_DVCC_MEA2 (__IO uint32_t *)(0x80D54)
203+
#define NVR_BGP_MEA2 (__IO uint32_t *)(0x80D58)
204+
#define NVR_RCL_MEA2 (__IO uint32_t *)(0x80D5C)
205+
#define NVR_RCH_MEA2 (__IO uint32_t *)(0x80D60)
206+
#define NVR_PWR_CHECKSUM2 (__IO uint32_t *)(0x80D64)
207+
//Chip ID
208+
#define NVR_CHIP1_ID0 (__IO uint32_t *)(0x80D68)
209+
#define NVR_CHIP1_ID1 (__IO uint32_t *)(0x80D6C)
210+
#define NVR_CHIP1_CHECKSUM (__IO uint32_t *)(0x80D70)
211+
#define NVR_CHIP2_ID0 (__IO uint32_t *)(0x80D74)
212+
#define NVR_CHIP2_ID1 (__IO uint32_t *)(0x80D78)
213+
#define NVR_CHIP2_CHECKSUM (__IO uint32_t *)(0x80D7C)
214+
//Temperature information
215+
#define NVR_REALTEMP1 (__IO uint32_t *)(0x80D80)
216+
#define NVR_MEATEMP1 (__IO uint32_t *)(0x80D84)
217+
#define NVR_TEMP_CHECKSUM1 (__IO uint32_t *)(0x80D88)
218+
#define NVR_REALTEMP2 (__IO uint32_t *)(0x80D9C)
219+
#define NVR_MEATEMP2 (__IO uint32_t *)(0x80D90)
220+
#define NVR_TEMP_CHECKSUM2 (__IO uint32_t *)(0x80D94)
221+
222+
uint32_t NVR_LoadANADataManual(void);
223+
uint32_t NVR_GetInfo_LoadRTCData(NVR_RTCINFO *RTCTempData, uint32_t DivCLKSource);
224+
uint32_t NVR_GetVoltageParameters(uint32_t Mode, NVR_ADCVOLPARA *Parameter);
225+
uint32_t NVR_GetTempParameters(NVR_TempParams *TempParams);
226+
uint32_t NVR_GetMISCGain(NVR_MISCGain *MEAResult);
227+
uint32_t NVR_GetChipID(NVR_CHIPID *ChipID);
228+
229+
#ifdef __cplusplus
230+
}
231+
#endif
232+
233+
#endif /* __LIB_LOADNVR_H */
234+
235+
/*********************************** END OF FILE ******************************/

0 commit comments

Comments
 (0)