Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
时昊
RT_RMR42E
Commits
360f1dbc
Commit
360f1dbc
authored
Mar 12, 2025
by
高士达
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lgh_from_dev' into 'dev'
Lgh from dev See merge request
!29
parents
923910cb
2f6966ca
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1090 additions
and
124 deletions
+1090
-124
CAN_CH0_CAN_Communication_Matrix.c
...ce/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
+1
-1
CommonInterface.c
...ware/Source/Application/CommonInterface/CommonInterface.c
+2
-1
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+0
-26
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+8
-0
BU98R10.c
Firmware/Source/Component/BU98R10/BU98R10.c
+173
-32
BU98R10.h
Firmware/Source/Component/BU98R10/BU98R10.h
+1
-1
Line_In_user.c
Firmware/Source/Component/Line_In/Line_In_user.c
+8
-1
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+18
-26
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+27
-27
DeepSleep.c
...urce/Device/Cmsemicon/BAT32A239/RTE/DeepSleep/DeepSleep.c
+2
-2
DeepSleep.h
...urce/Device/Cmsemicon/BAT32A239/RTE/DeepSleep/DeepSleep.h
+1
-1
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+1
-1
UDS_ISO14229_Services.c
Firmware/Source/UDS/UDS_ISO14229_Services.c
+1
-1
UDS_ISO14229_Services.h
Firmware/Source/UDS/UDS_ISO14229_Services.h
+4
-4
RT_RMR42E_RMRE42-60_Boot_BV1.03_20250309.hex
.../BootRelease/RT_RMR42E_RMRE42-60_Boot_BV1.03_20250309.hex
+843
-0
No files found.
Firmware/Source/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
View file @
360f1dbc
...
...
@@ -991,7 +991,7 @@ uint8_t Get_CAN_CH0_ID_18E_Sig_EMS_FuelSensorVld(void)
uint8_t
Get_CAN_CH0_ID_18E_Sig_EMS_FuelRemainLevel
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0
,
CAN_CH0_ID_EMS_Parameter2_Msg_Count
,
0u
)
>>
0
u
)
&
0x0Fu
));
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0
,
CAN_CH0_ID_EMS_Parameter2_Msg_Count
,
0u
)
>>
4
u
)
&
0x0Fu
));
}
uint16_t
Get_CAN_CH0_ID_3B1_Sig_CHG_TotalChargeTime
(
void
)
...
...
Firmware/Source/Application/CommonInterface/CommonInterface.c
View file @
360f1dbc
...
...
@@ -134,8 +134,9 @@ void Common_Input_Para(void)
Common_Set_IG_Sts
(
COMMON_POWER_OFF
);
Common_Set_IG_Sts_Valid
(
COMMON_Valid
);
#else
if
(
Get_CAN_Power_State
()
==
KEY_OFF
)
if
(
(
Get_CAN_Power_State
()
==
KEY_OFF
)
&&
(
RTE_GPIO_Get_Level
(
KL15_AD_IN
)
!=
1U
)
)
{
/*KL15 OFF的情况下开始计时*/
if
(
PowerIgnOffTimeLine
<
0x7ffffffful
)
{
PowerIgnOffTimeLine
+=
2u
;
...
...
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
360f1dbc
...
...
@@ -421,37 +421,11 @@ void Gauge_CAN_setup_Service(void)
void
Checkself_LED_Display
(
void
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_00_Grass_Full_R
,
LED_ON
);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_ON);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_02_System_Indicator_R
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_05_Gears_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_Battery_Charging_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_10_READY_G
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_11_Key_Access_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_12_Seat_Detection_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_13_OVERLOAD_R
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_14_Cutterhead_Switch_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_15_Cutterhead_Gear_W
,
LED_ON
);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_17_External_Discharge_W, LED_ON);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_21_LED_Open_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_31_Working_Hours_One_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_32_Charging_Connection_R
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_19_Fault_Codes_W
,
LED_ON
);
SEG_SET_LED_STS
(
SEG_LED_Recharge
,
1
);
SEG_SET_LED_STS
(
SEG_LED_System_Light
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Chloramine
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Cutter_Overload
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Seat_Detection
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Key_Access
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Ready
,
1
);
SEG_SET_LED_STS
(
SEG_LED_Cutter_Head_switch
,
1
);
// SEG_SET_LED_STS(SEG_LED_External_Discharge, 1);
SEG_SET_LED_STS
(
SEG_LED_Distance_Light
,
1
);
SEG_SET_LED_STS
(
SEG_LED_HHT_Charger
,
1
);
SEG_SET_Frame
(
1
);
}
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
360f1dbc
...
...
@@ -2791,6 +2791,10 @@ void Check_SEG_Display(void)
uint8_t
Fuel
=
0
;
uint32_t
fau_code
=
Checkself_num
*
1111
;
Fuel
=
Checkself_SEG_step
/
5u
;
if
(
Fuel
>=
8U
)
{
Fuel
=
8U
;
}
SEG_SET_FuelDial
(
1
,
Fuel
);
SEG_SET_Fault_Code
(
1
,
fau_code
,
1
);
SEG_SET_Fault_Code_Spanner
(
1
,
1
,
0
);
...
...
@@ -2880,6 +2884,10 @@ void Checkself_SEG_Display(void)
uint8_t
Fuel
=
0
;
uint32_t
fau_code
=
Checkself_num
*
1111
;
Fuel
=
Checkself_SEG_step
/
5u
;
if
(
Fuel
>=
8U
)
{
Fuel
=
8U
;
}
SEG_SET_FuelDial
(
1
,
Fuel
);
SEG_SET_Fault_Code
(
1
,
fau_code
,
1
);
SEG_SET_Fault_Code_Spanner
(
1
,
1
,
0
);
...
...
Firmware/Source/Component/BU98R10/BU98R10.c
View file @
360f1dbc
#include "Components.h"
#include "BAT32A239.h"
#include <string.h>
#include <stdio.h>
#define BU98R10_CHIP0_SD RTE_GPIO_PORT00_PIN02
#define BU98R10_CHIP0_CSB RTE_GPIO_PORT00_PIN03
...
...
@@ -8,6 +12,8 @@
#define BU98R10_CHIP1_CSB RTE_GPIO_PORT07_PIN01
#define BU98R10_CHIP1_SCL RTE_GPIO_PORT07_PIN00
#define BU98R10_NOP_TIME 5U
uint8_t
BU98R10_CHIP0_GET_SD_LEVEL
(
void
);
uint8_t
BU98R10_CHIP0_GET_SD_LEVEL
(
void
)
{
...
...
@@ -19,18 +25,82 @@ uint8_t BU98R10_CHIP1_GET_SD_LEVEL(void)
return
RTE_GPIO_Get_Level
(
BU98R10_CHIP1_SD
);
}
void
NOP_DelayTime
(
uint8_t
timer
)
{
// uint8_t i = 0;
// for(i = 0;i < timer;i++)
// {
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
__NOP
();
// }
}
void
BU98R10_CHIP0_SET_SD_LEVEL
(
uint8_t
Level
);
void
BU98R10_CHIP0_SET_SD_LEVEL
(
uint8_t
Level
)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
//RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_HIGH);
//PORT->P0 |= (1<<2);
//PORT->PM0 &= ~(1<<2);
PORT
->
PM0
&=
~
(
1
<<
2
);
PORT
->
PSET0
=
(
1
<<
2
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
//RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_LOW);
// PORT->P0 &= ~(1<<2);//P02
// PORT->PM0 &= ~(1<<2);
PORT
->
PM0
&=
~
(
1
<<
2
);
PORT
->
PCLR0
=
(
1
<<
2
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
}
void
BU98R10_CHIP1_SET_SD_LEVEL
(
uint8_t
Level
);
...
...
@@ -38,13 +108,23 @@ void BU98R10_CHIP1_SET_SD_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
//RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_HIGH);
// PORT->P7 |= (1<<2);
// PORT->PM7 &= ~(1<<2);
PORT
->
PM7
&=
~
(
1
<<
2
);
PORT
->
PSET7
=
(
1
<<
2
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
//RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_LOW);
// PORT->P7 &= ~(1<<2);//P72
// PORT->PM7 &= ~(1<<2);
PORT
->
PM7
&=
~
(
1
<<
2
);
PORT
->
PCLR7
=
(
1
<<
2
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
}
void
BU98R10_CHIP0_SET_CSB_LEVEL
(
uint8_t
Level
);
...
...
@@ -52,13 +132,23 @@ void BU98R10_CHIP0_SET_CSB_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP0_CSB
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Config(BU98R10_CHIP0_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
//RTE_GPIO_Set_Level(BU98R10_CHIP0_CSB, RTE_GPIO_LEVEL_HIGH);
// PORT->P0 |= (1<<3);
// PORT->PM0 &= ~(1<<3);
PORT
->
PM0
&=
~
(
1
<<
3
);
PORT
->
PSET0
=
(
1
<<
3
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP0_CSB
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Config(BU98R10_CHIP0_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
//RTE_GPIO_Set_Level(BU98R10_CHIP0_CSB, RTE_GPIO_LEVEL_LOW);
// PORT->P0 &= ~(1<<3);//P03
// PORT->PM0 &= ~(1<<3);
PORT
->
PM0
&=
~
(
1
<<
3
);
PORT
->
PCLR0
=
(
1
<<
3
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
}
void
BU98R10_CHIP1_SET_CSB_LEVEL
(
uint8_t
Level
);
...
...
@@ -66,13 +156,23 @@ void BU98R10_CHIP1_SET_CSB_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP1_CSB
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Config(BU98R10_CHIP1_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
//RTE_GPIO_Set_Level(BU98R10_CHIP1_CSB, RTE_GPIO_LEVEL_HIGH);
// PORT->P7 |= (1<<1);
// PORT->PM7 &= ~(1<<1);
PORT
->
PM7
&=
~
(
1
<<
1
);
PORT
->
PSET7
=
(
1
<<
1
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP1_CSB
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Config(BU98R10_CHIP1_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
//RTE_GPIO_Set_Level(BU98R10_CHIP1_CSB, RTE_GPIO_LEVEL_LOW);
// PORT->P7 &= ~(1<<1);//P71
// PORT->PM7 &= ~(1<<1);
PORT
->
PM7
&=
~
(
1
<<
1
);
PORT
->
PCLR7
=
(
1
<<
1
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
}
void
BU98R10_CHIP0_SET_SCL_LEVEL
(
uint8_t
Level
);
...
...
@@ -80,13 +180,23 @@ void BU98R10_CHIP0_SET_SCL_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SCL
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Config(BU98R10_CHIP0_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
//RTE_GPIO_Set_Level(BU98R10_CHIP0_SCL, RTE_GPIO_LEVEL_HIGH);
// PORT->P0 |= (1<<4);
// PORT->PM0 &= ~(1<<4);
PORT
->
PM0
&=
~
(
1
<<
4
);
PORT
->
PSET0
=
(
1
<<
4
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SCL
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Config(BU98R10_CHIP0_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
//RTE_GPIO_Set_Level(BU98R10_CHIP0_SCL, RTE_GPIO_LEVEL_LOW);
// PORT->P0 &= ~(1<<4);//P04
// PORT->PM0 &= ~(1<<4);
PORT
->
PM0
&=
~
(
1
<<
4
);
PORT
->
PCLR0
=
(
1
<<
4
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
}
void
BU98R10_CHIP1_SET_SCL_LEVEL
(
uint8_t
Level
);
...
...
@@ -94,13 +204,23 @@ void BU98R10_CHIP1_SET_SCL_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SCL
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Config(BU98R10_CHIP1_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
//RTE_GPIO_Set_Level(BU98R10_CHIP1_SCL, RTE_GPIO_LEVEL_HIGH);
// PORT->P7 |= (1<<0);
// PORT->PM7 &= ~(1<<0);
PORT
->
PM7
&=
~
(
1
<<
0
);
PORT
->
PSET7
=
(
1
<<
0
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SCL
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Config(BU98R10_CHIP1_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
//RTE_GPIO_Set_Level(BU98R10_CHIP1_SCL, RTE_GPIO_LEVEL_LOW);
// PORT->P7 &= ~(1<<0);//P70
// PORT->PM7 &= ~(1<<0);
PORT
->
PM7
&=
~
(
1
<<
0
);
PORT
->
PCLR7
=
(
1
<<
0
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
}
void
BU98R10_CHIP0_SET_SD_DIR
(
uint8_t
Dir
);
...
...
@@ -108,11 +228,19 @@ void BU98R10_CHIP0_SET_SD_DIR(uint8_t Dir)
{
if
(
Dir
)
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_HIGH);
// PORT->P0 |= (1<<2);
// PORT->PM0 &= ~(1<<2);
// RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
PORT
->
PSET0
=
(
1
<<
2
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SD
,
RTE_GPIO_DIR_IN
);
//RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_IN);
// PORT->PM0 |= (1<<2);
PORT
->
PCLR0
=
(
1
<<
2
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
}
void
BU98R10_CHIP1_SET_SD_DIR
(
uint8_t
Dir
);
...
...
@@ -120,11 +248,19 @@ void BU98R10_CHIP1_SET_SD_DIR(uint8_t Dir)
{
if
(
Dir
)
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_HIGH);
//RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
// PORT->P7 |= (1<<2);
// PORT->PM7 &= ~(1<<2);
PORT
->
PSET7
=
(
1
<<
2
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SD
,
RTE_GPIO_DIR_IN
);
//RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_IN);
// PORT->PM7 |= (1<<2);
PORT
->
PCLR7
=
(
1
<<
2
);
NOP_DelayTime
(
BU98R10_NOP_TIME
);
}
}
...
...
@@ -139,6 +275,7 @@ BU98R10DDRAMUnion BU98R10Chip1DDRAMBackup;
#endif
BU98R10UpdateCtrlStruct
BU98R10Update
;
uint32_t
u32BU98R10ForcedUpdate
=
0UL
;
void
BU98R10_Init
(
void
)
{
...
...
@@ -147,8 +284,12 @@ void BU98R10_Init(void)
#if BU98R10_WRITE_AT_SAME_TIME
#if BU98R10_COLORFUL_LCD_MODE
Gen_TimeDelay
(
120
*
1000u
,
50u
);
BU98R10_All_Command_Write
(
BU98R10_CMD_SWRST
);
Gen_TimeDelay
(
20
*
1000
,
50U
);
BU98R10_All_Command_Write
(
BU98R10_CMD_ICSET
|
BU98R10_PAR_ICSET_RGB
);
BU98R10_All_Command_Write
(
BU98R10_CMD_DRVCTRL
|
BU98R10_PAR_DRVCTRL_NORMAL
);
...
...
@@ -407,7 +548,7 @@ void BU98R10_Init(void)
#endif
#endif
#endif
u32BU98R10ForcedUpdate
=
0UL
;
BU98R10Update
.
En
=
0
;
BU98R10Update
.
Step
=
0
;
BU98R10Update
.
Cont
=
0
;
...
...
@@ -437,25 +578,23 @@ void BU98R10_Shutdown(void)
#endif
}
uint8_t
u8BU98R10CheckCount
=
0
;
#define BU98R10_FORCED_SEG_NUM 2U
void
BU98R10_Update_Request
(
void
)
{
// if (g_sysFlag.Bits.AccSaveState)
//{
// //if (u8BU98R10CheckCount < 20)
// //{
// // BU98R10Update.En = 1;
// // u8BU98R10CheckCount++;
// //}
// BU98R10Update.En = 1;
// }
// else
if
(
BU98R10Update
.
En
==
0
)
{
u8BU98R10CheckCount
=
0
;
BU98R10Update
.
En
=
1
;
if
(
u32BU98R10ForcedUpdate
<=
(
BU98R10_DDRAM_SIZE
-
BU98R10_FORCED_SEG_NUM
))
{
u32BU98R10ForcedUpdate
+=
BU98R10_FORCED_SEG_NUM
;
}
else
{
u32BU98R10ForcedUpdate
=
0UL
;
}
}
BU98R10Update
.
En
=
1
;
#if USE_BU98R10_CHIP_0
BU98R10Update
.
Chip
=
0
;
#elif USE_BU98R10_CHIP_1
...
...
@@ -475,7 +614,9 @@ void BU98R10_Update_Service(void)
{
case
0
:
if
((
BU98R10Chip0DDRAM
.
Byte
[
BU98R10Update
.
Addr
]
!=
BU98R10Chip0DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
])
||
(
BU98R10Chip1DDRAM
.
Byte
[
BU98R10Update
.
Addr
]
!=
BU98R10Chip1DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
]))
(
BU98R10Chip1DDRAM
.
Byte
[
BU98R10Update
.
Addr
]
!=
BU98R10Chip1DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
])
||
((
u32BU98R10ForcedUpdate
<=
BU98R10Update
.
Addr
)
&&
((
u32BU98R10ForcedUpdate
+
BU98R10_FORCED_SEG_NUM
)
>=
BU98R10Update
.
Addr
)))
{
BU98R10Chip0DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
]
=
BU98R10Chip0DDRAM
.
Byte
[
BU98R10Update
.
Addr
];
BU98R10Chip1DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
]
=
BU98R10Chip1DDRAM
.
Byte
[
BU98R10Update
.
Addr
];
...
...
Firmware/Source/Component/BU98R10/BU98R10.h
View file @
360f1dbc
...
...
@@ -938,7 +938,7 @@ void BU98R10_All_Data_Write(uint8_t Dat0, uint8_t Dat1);
extern
void
checkSegTftState
(
void
);
#endif
extern
void
NOP_DelayTime
(
uint8_t
timer
);
#endif
Firmware/Source/Component/Line_In/Line_In_user.c
View file @
360f1dbc
...
...
@@ -3,12 +3,19 @@
#include "Components.h"
#include "Application.h"
#if (PART_NUMBER == RMR42E_60)
const
Line_In_Attribute_st
g_stLineInAttribute
[
LINE_IN_MAX
]
=
{
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
470U
,
20U
,
Get_LINE_IN_GrassFull
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
470U
,
20U
,
Get_LINE_IN_BigLED
,
},
};
#else
const
Line_In_Attribute_st
g_stLineInAttribute
[
LINE_IN_MAX
]
=
{
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
470U
,
20U
,
Get_LINE_IN_GrassFull
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
470U
,
20U
,
Get_LINE_IN_BigLED
,
},
};
#endif
Linelib_uint8_t
Get_LINE_IN_GrassFull
(
void
)
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
360f1dbc
...
...
@@ -84,7 +84,7 @@ extern uint32_t PowerIgnOffTimeLine;
static
void
Power_Wakeup_Init
(
void
)
{
PowerIgnOffTimeLine
=
0
;
g_u8CanrxSleepstate
=
0U
;
//
g_u8CanrxSleepstate = 0U;
Simulated_IIC_2_Init
();
Gpio_Init
(
Gpio_WakeUp_Init
);
Can_Init
();
...
...
@@ -101,6 +101,7 @@ static void Power_Wakeup_Init(void)
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER0
,
TIMERM_CHD
,
ActiveLevel_High
);
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
ActiveLevel_High
);
Telltales_Init
();
// RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN,Trigger_None);
// RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN,Trigger_Rising);
}
...
...
@@ -124,6 +125,7 @@ static void Power_IG_ON_Init(void)
Checkself_Init
();
Line_In_KL15_ON_Init
();
LED_Driver_Service_Immediate
();
Telltales_KL15_Init
();
Fault_Code_KL15_Init
();
Data_Time_KL15_Init
();
Data_Soc_KL15_Init
();
...
...
@@ -149,8 +151,12 @@ static void Power_Sleep_Init(void)
LED_Driver_Service
();
Analog_Signal_Conv_Stop
();
// RTE_DEEPSLEEP_Enable();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
CAN_MCU_RXD
,
Trigger_Falling
);
g_u8CanrxSleepstate
=
0U
;
// RTE_DEEPSLEEP_GPIO_Interrupt_Enable(CAN_MCU_RXD,Trigger_Falling);
// if(g_powerState == 0U)
// {
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
// }
// g_u8CanrxSleepstate = 0U;
}
static
Power_Status_em
Power_Stay_ON
(
void
)
...
...
@@ -195,22 +201,19 @@ static Power_Status_em Power_Stay_OFF(void)
{
u8PowerSts
=
EM_IGN_ON_Init
;
}
else
if
(
Get_CAN_Power_State
()
==
PKEY_ON
)
{
;
}
else
{
if
(
Get_CAN_Power_State
()
==
PKEY_ON
)
if
(
(
Common_GetIgnOffTime
()
<
5000
)
)
{
if
(
EnterDeepSleepCount
>=
5000
)
{
u8PowerSts
=
EM_IGN_Sleep_Init
;
}
else
{
u8PowerSts
=
EM_IGN_OFF
;
}
u8PowerSts
=
EM_IGN_OFF
;
}
else
{
if
(
(
Common_GetIgnOffTime
()
<
5000
))
if
(
RTE_GPIO_Get_Level
(
KL15_AD_IN
))
{
u8PowerSts
=
EM_IGN_OFF
;
}
...
...
@@ -305,7 +308,7 @@ static Power_Status_em Power_Stay_Protect(void)
static
Power_Status_em
Power_Stay_Sleep
(
void
)
{
Power_Status_em
u8PowerSts
=
EM_IGN_Sleep
;
#if (PART_NUMBER == RMR42E_60)
while
(
1
)
{
RTE_WDT_Clear
();
...
...
@@ -314,23 +317,12 @@ static Power_Status_em Power_Stay_Sleep(void)
u8PowerSts
=
EM_IGN_Wakeup
;
break
;
}
}
#else
while
(
1
)
{
RTE_WDT_Clear
();
if
((
Get_CAN_Power_State
()
==
PKEY_ON
)
&&
(
g_u8CanrxSleepstate
==
1U
))
/*当电源状态出于PKEY_ON,且接到CAN信号时,才能触发唤醒*/
{
u8PowerSts
=
EM_IGN_Wakeup
;
g_u8CanrxSleepstate
=
0U
;
break
;
}
else
{
RTE_DEEPSLEEP_Enable
();
}
}
#endif
return
u8PowerSts
;
}
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
360f1dbc
This diff is collapsed.
Click to expand it.
Firmware/Source/Device/Cmsemicon/BAT32A239/RTE/DeepSleep/DeepSleep.c
View file @
360f1dbc
...
...
@@ -178,12 +178,12 @@ void DEEPSLEEP_EXTI0_IRQHandler(void *msg)
* @since 1.0.0
*/
unsigned
char
g_u8CanrxSleepstate
=
0U
;
//
unsigned char g_u8CanrxSleepstate = 0U;
void
DEEPSLEEP_EXTI1_IRQHandler
(
void
*
msg
)
{
/* ����жϱ�־ */
INTC_ClearPendingIRQ
(
INTP1_IRQn
);
g_u8CanrxSleepstate
=
1U
;
//
g_u8CanrxSleepstate = 1U;
}
/**
...
...
Firmware/Source/Device/Cmsemicon/BAT32A239/RTE/DeepSleep/DeepSleep.h
View file @
360f1dbc
...
...
@@ -5,7 +5,7 @@
#include "gpio.h"
#include "intp.h"
extern
unsigned
char
g_u8CanrxSleepstate
;
//
extern unsigned char g_u8CanrxSleepstate;
extern
void
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
uint16_t
u16Pin
,
Trigger_TypeDef
EXTI_Trigger
);
extern
void
RTE_DEEPSLEEP_Enable
(
void
);
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
360f1dbc
...
...
@@ -99,7 +99,7 @@ void Sys_Exact_50us_Tasks(void)
#if (PART_NUMBER == G54_A01)
if
(
g_powerState
==
2U
)
{
Can_Write_Fun
(
&
CAN_CH0_CanMsgTxOp
,
50u
);
//
Can_Write_Fun(&CAN_CH0_CanMsgTxOp, 50u);
}
#else
Can_Write_Fun
(
&
CAN_CH0_CanMsgTxOp
,
50u
);
...
...
Firmware/Source/UDS/UDS_ISO14229_Services.c
View file @
360f1dbc
...
...
@@ -93,7 +93,7 @@ uint8_t MCU_HWversion[6] = {'H', 'V', (uint8_t)((HWV >> 8u) & 0x0Fu) + 0x30u, '.
uint8_t
MCU_FBLversion
[
6
]
=
{
'B'
,
'V'
,
(
uint8_t
)((
BTV
>>
8u
)
&
0x0Fu
)
+
0x30u
,
'.'
,
(
uint8_t
)((
BTV
>>
4u
)
&
0x0Fu
)
+
0x30u
,
(
uint8_t
)(
BTV
&
0x0Fu
)
+
0x30u
};
//零件号信息 F187
uint8_t
MCU_PartNumber
[
6
]
=
{
'
H'
,
'J'
,
'Y'
,
'B'
,
'-'
,
'5
'
};
uint8_t
MCU_PartNumber
[
6
]
=
{
'
G'
,
'5'
,
'4'
,
'A'
,
'0'
,
'1
'
};
void
Data_Set_DiagPara
(
void
)
{
...
...
Firmware/Source/UDS/UDS_ISO14229_Services.h
View file @
360f1dbc
...
...
@@ -310,13 +310,13 @@
#define CheckSumErr 7 // Checksum Error
#define UnknownPartID 8 // Unknown Part ID
#define SWV 0x10
0
// 0x100 = 1.00 software version 软件版本号
#define SWV 0x10
1
// 0x100 = 1.00 software version 软件版本号
#define HWV 0x100 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x10
2
// 0x100 = 1.00 bootloader version boot程序版本号
#define INTLV 0x10
0
// 0x100 = 1.00 internal version 内部版本号
#define BTV 0x10
3
// 0x100 = 1.00 bootloader version boot程序版本号
#define INTLV 0x10
1
// 0x100 = 1.00 internal version 内部版本号
#define PROG_Y 0x25 // 0x24 = 2024年, program year
#define PROG_M 0x03 // 0x03 = 3月, program month
#define PROG_D 0x
07
// 0x19 = 19日, program day
#define PROG_D 0x
12
// 0x19 = 19日, program day
/******************************************************************************
Bootloader Variable
...
...
Firmware/utility/BootRelease/RT_RMR42E_RMRE42-60_Boot_BV1.03_20250309.hex
0 → 100644
View file @
360f1dbc
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment