Commit f6f4203e authored by 时昊's avatar 时昊

feat:增加630串口功能,电源管理正常使用

parent 538724af
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -668,16 +668,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Application\Protocol_User.c</FilePath>
</File>
<File>
<FileName>CAN_CH0_CAN_Communication_Matrix.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Application\CAN_CH0_CAN_Communication_Matrix.c</FilePath>
</File>
<File>
<FileName>CAN_CH0_CAN_Communication_Matrix.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\CAN_CH0_CAN_Communication_Matrix.h</FilePath>
</File>
<File>
<FileName>Data_ESpeed.c</FileName>
<FileType>1</FileType>
......@@ -698,16 +688,6 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\Data_VSpeed.h</FilePath>
</File>
<File>
<FileName>Data_Coolant.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Application\Data_Coolant.c</FilePath>
</File>
<File>
<FileName>Data_Coolant.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\Data_Coolant.h</FilePath>
</File>
</Files>
</Group>
<Group>
......@@ -893,26 +873,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Component\Simulated_IIC_master\Simulated_IIC_master_Porting.c</FilePath>
</File>
<File>
<FileName>System_Monitor.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.h</FilePath>
</File>
<File>
<FileName>System_Monitor.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.lib</FilePath>
</File>
<File>
<FileName>System_Monitor_User.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor_User.c</FilePath>
</File>
<File>
<FileName>System_Monitor_User.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor_User.h</FilePath>
</File>
<File>
<FileName>Telltales_Lib.h</FileName>
<FileType>5</FileType>
......@@ -943,6 +903,71 @@
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\PowerManagement\PowerManagement.lib</FilePath>
</File>
<File>
<FileName>AMT630H.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\AMT630H.c</FilePath>
</File>
<File>
<FileName>AMT630H.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\AMT630H.h</FilePath>
</File>
<File>
<FileName>GraphicsFunc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\GraphicsFunc.c</FilePath>
</File>
<File>
<FileName>PicBin.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\PicBin.c</FilePath>
</File>
<File>
<FileName>PicBin.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\PicBin.h</FilePath>
</File>
<File>
<FileName>UartProtocol.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\UartProtocol.h</FilePath>
</File>
<File>
<FileName>UartProtocol_V1.32_BAT32A239.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\UartProtocol_V1.32_BAT32A239.lib</FilePath>
</File>
<File>
<FileName>AMT630H_Datas.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\AMT630H_Datas.c</FilePath>
</File>
<File>
<FileName>AMT630H_Datas.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\AMT630H_Datas.h</FilePath>
</File>
<File>
<FileName>System_Monitor.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.c</FilePath>
</File>
<File>
<FileName>System_Monitor.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.h</FilePath>
</File>
<File>
<FileName>System_Monitor_User.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor_User.c</FilePath>
</File>
<File>
<FileName>System_Monitor_User.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor_User.h</FilePath>
</File>
</Files>
</Group>
<Group>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -464,12 +464,12 @@ ARM Macro Assembler Page 8
00000000
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M0+ --apcs=inter
work --depend=.\objects\startup_bat32a279.d -o.\objects\startup_bat32a279.o -I.
\RTE\Device\BAT32A279KM64FB -I.\RTE\_HaoJin750TFT -IC:\Users\Administrator\AppD
ata\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include -IC:\Users\Administrator
\AppData\Local\Arm\Packs\Cmsemicon\BAT32A279\1.0.4\Device\Include --predefine="
__MICROLIB SETA 1" --predefine="__UVISION_VERSION SETA 535" --predefine="_RTE_
SETA 1" --predefine="_RTE_ SETA 1" --list=.\listings\startup_bat32a279.lst RTE\
Device\BAT32A279KM64FB\startup_BAT32A279.s
\RTE\Device\BAT32A279KM64FB -I.\RTE\_HaoJin750TFT -IC:\Users\tyw05\AppData\Loca
l\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include -IC:\Users\tyw05\AppData\Local\A
rm\Packs\Cmsemicon\BAT32A279\1.0.4\Device\Include --predefine="__MICROLIB SETA
1" --predefine="__UVISION_VERSION SETA 535" --predefine="_RTE_ SETA 1" --predef
ine="_RTE_ SETA 1" --list=.\listings\startup_bat32a279.lst RTE\Device\BAT32A279
KM64FB\startup_BAT32A279.s
......
......@@ -125,7 +125,7 @@ __Vectors_Size EQU __Vectors_End - __Vectors
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
IMPORT __main
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
......
......@@ -22,43 +22,43 @@ void BackLight_Process(void)
{
if (SYS_OPR_STAT_IGN_ON)
{
if(MenuInfor.BackLight_Val == BackLight_Val_A)
{
//g_Light.Light_Auto = ALS_Get_Data1();
if (g_Light.Light_Auto >= 1000)
{
g_Light.Light_Auto = 1000;
}
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, g_Light.Light_Auto);
}
else if(MenuInfor.BackLight_Val == BackLight_Val_1)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_1);
}
else if(MenuInfor.BackLight_Val == BackLight_Val_2)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_2);
}
else if(MenuInfor.BackLight_Val == BackLight_Val_3)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_3);
}
else if(MenuInfor.BackLight_Val == BackLight_Val_4)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_4);
}
else if(MenuInfor.BackLight_Val == BackLight_Val_5)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_5);
}
else
{
;
}
//if(MenuInfor.BackLight_Val == BackLight_Val_A)
//{
// //g_Light.Light_Auto = ALS_Get_Data1();
// if (g_Light.Light_Auto >= 1000)
// {
// g_Light.Light_Auto = 1000;
// }
// TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, g_Light.Light_Auto);
//}
//else if(MenuInfor.BackLight_Val == BackLight_Val_1)
//{
// TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_1);
//}
//else if(MenuInfor.BackLight_Val == BackLight_Val_2)
//{
// TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_2);
//}
//else if(MenuInfor.BackLight_Val == BackLight_Val_3)
//{
// TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_3);
//}
//else if(MenuInfor.BackLight_Val == BackLight_Val_4)
//{
// TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_4);
//}
//else if(MenuInfor.BackLight_Val == BackLight_Val_5)
//{
//TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_5);
//}
//else
//{
// ;
//}
}
else
{
g_Light.Light_Auto = 0;
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 0);
//g_Light.Light_Auto = 0;
//TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 0);
}
}
......@@ -3,7 +3,7 @@
#include "Components.h"
static uint32_t PowerIgnOnTimeLine;
uint32_t PowerIgnOnTimeLine;
uint32_t PowerIgnOffTimeLine;
static uint32_t PowerSocTimeLine;
......
......@@ -72,7 +72,7 @@ void Data_Vehicle_Speed_Processing_Service(void)
//uint8_t ESC_VehicleSpeedvalid;
uint32_t Vehicle_Speed;
Vehicle_Speed = Get_CAN_CH0_ID_101_Sig_ECU_Vehicle_Speed( );
//Vehicle_Speed = Get_CAN_CH0_ID_101_Sig_ECU_Vehicle_Speed( );
//ESC_VehicleSpeedvalid = Get_CAN_CH0_ID_330_Sig_ESC_Vehicle_speed_valid( );
// 第1步:获取实际车速值及车速有效性
......
This diff is collapsed.
......@@ -12,7 +12,7 @@
#define L_BiasBitSW_100 RTE_GPIO_PORT00_PIN05
#define L_BiasBitSW_10 RTE_GPIO_PORT00_PIN06
#define Blacklight_PWM RTE_GPIO_PORT01_PIN00
#define Blacklight_PWM RTE_GPIO_PORT01_PIN00 //ljs
#define RXD_ESP_IN_MCU RTE_GPIO_PORT01_PIN01
#define TXD_ESP_IN_MCU RTE_GPIO_PORT01_PIN02
#define NONE_3 RTE_GPIO_PORT01_PIN03
......@@ -23,8 +23,8 @@
#define AVDD RTE_GPIO_PORT02_PIN00
#define GND RTE_GPIO_PORT02_PIN01
#define KL30_AD_MCU_IN RTE_GPIO_PORT02_PIN02
#define KL15_AD_MCU_IN RTE_GPIO_PORT02_PIN03
#define KL30_AD_MCU_IN RTE_GPIO_PORT02_PIN02 //ljs
#define KL15_AD_MCU_IN RTE_GPIO_PORT02_PIN03 //ljs
#define TCS RTE_GPIO_PORT02_PIN04
#define Fuel_AD_IN_MCU RTE_GPIO_PORT02_PIN05
#define Water_Temperature RTE_GPIO_PORT02_PIN06
......@@ -36,7 +36,7 @@
#define SWDIO RTE_GPIO_PORT04_PIN00
#define Smart_Lock RTE_GPIO_PORT04_PIN01
#define MODE_IN_MCU RTE_GPIO_PORT04_PIN02
#define SET_IN_MCU RTE_GPIO_PORT04_PIN03
#define VCC1V2_AMT_EN RTE_GPIO_PORT04_PIN03 //ljs
#define MCU_OUT_2CH_20k RTE_GPIO_PORT05_PIN00
#define MCU_OUT_1CH_200 RTE_GPIO_PORT05_PIN01
......@@ -53,11 +53,11 @@
#define SCL_2 RTE_GPIO_PORT07_PIN00
#define CSB_2 RTE_GPIO_PORT07_PIN01
#define SD_2 RTE_GPIO_PORT07_PIN02
#define L_BiasBitSW_10000 RTE_GPIO_PORT07_PIN03
#define L_BiasBitSW_1000 RTE_GPIO_PORT07_PIN04
#define ABS RTE_GPIO_PORT07_PIN05
#define RXD_2 RTE_GPIO_PORT07_PIN06
#define TXD_2 RTE_GPIO_PORT07_PIN07
#define MCU_RSTB_LCD RTE_GPIO_PORT07_PIN03 //ljs
#define L_BiasBitSW_1000 RTE_GPIO_PORT07_PIN04
#define STBYB_LCD_MCU RTE_GPIO_PORT07_PIN05 //ljs
#define RXD_2 RTE_GPIO_PORT07_PIN06 //ljs
#define TXD_2 RTE_GPIO_PORT07_PIN07 //ljs
#define L_BiasBitSW_POW RTE_GPIO_PORT12_PIN00
#define X_1 RTE_GPIO_PORT12_PIN01
......@@ -69,7 +69,7 @@
#define Neutral RTE_GPIO_PORT13_PIN06
#define SWCLK RTE_GPIO_PORT13_PIN07
#define L_BD433Ctrl_OUT RTE_GPIO_PORT14_PIN00
#define VCC_33_EN_MCU RTE_GPIO_PORT14_PIN00 //ljs
#define L_BiasBitSW_Fuel_OUT RTE_GPIO_PORT14_PIN01
#define A_Version RTE_GPIO_PORT14_PIN06
#define NONE_1 RTE_GPIO_PORT14_PIN07
......
This diff is collapsed.
#ifndef AMT_630H_H
#define AMT_630H_H
#include <stdint.h>
typedef enum
{
EM_FLASH_CHECK_RESULT_NO_ACT = 0,
EM_FLASH_CHECK_RESULT_CHECKING,
EM_FLASH_CHECK_RESULT_SUCCESS,
EM_FLASH_CHECK_RESULT_FAIL,
}EM_FLASH_CHECK_RESULT_T;
typedef struct
{
uint8_t Flag;
uint32_t InquireTime;
uint32_t CheckStateTime;
uint8_t Result;
}s_AMT630H_FlashCheck_t;
#define AMT630H_REFRESH_TIME 50U
#define AMT630H_ANIMATION_TIME 3000U //ms
#define AMT630H_ANIMATION_PIC_NUM 146U
#define AMT630H_ANIMATION_REFRESHTIME_DEF(x) ((AMT630H_ANIMATION_TIME > x) ? \
(((AMT630H_ANIMATION_TIME - x) / AMT630H_ANIMATION_PIC_NUM) - 5) : \
(((AMT630H_ANIMATION_TIME) / AMT630H_ANIMATION_PIC_NUM) - 5))
void AMT630H_Timer(unsigned char Tms);
void Delay_Time_Ctrl(unsigned long Tms);
void Amt630hUartRecvData(uint16_t u16UARTData);
void AMT630H_Animation_PlayProc(uint16_t PicIndex);
void AMT630H_RstCtrl(void);
void Amt630hInit(void);
void AMT630H_Sleep(void);
static void AMT630H_AliveCounterMonitor(void);
void AMT630H_Main(void);
unsigned char AMT630H_isInitFinish(void);
extern uint32_t Amt630hInitTimerCnts ;
#endif
\ No newline at end of file
This diff is collapsed.
#ifndef A69FAEFD_36D2_473A_A858_C02318EB402B
#define A69FAEFD_36D2_473A_A858_C02318EB402B
extern void AMT630H_GUI_DisplayProc(void);
extern void AMT630H_GUI_Background(void);
#endif /* A69FAEFD_36D2_473A_A858_C02318EB402B */
This diff is collapsed.
#include "UartProtocol.h"
#include "PicBin.h"
static const uint16_t PicIndexData[] = {
Pic_0001, 800, 0, 0, Pic_0002, 27, 751, 440, Pic_0003, 35, 681, 441, Pic_0004, 40, 603, 443, Pic_0005, 45, 521, 444, Pic_0006, 125, 360, 447, Pic_0007, 32, 293, 445, Pic_0008, 29, 233, 443, Pic_0009, 27, 170, 444, Pic_0010, 36, 90, 443,
Pic_0011, 27, 22, 440, Pic_0012, 808, 0, 95, Pic_0013, 802, 0, 57, Pic_0014, 14, 772, 390, Pic_0015, 8, 762, 390, Pic_0015, 8, 752, 390, Pic_0016, 5, 745, 390, Pic_0014, 14, 765, 390, Pic_0015, 8, 755, 390, Pic_0015, 8, 745, 390,
Pic_0014, 14, 755, 390, Pic_0017, 140, 600, 391, Pic_0018, 25, 600, 391, Pic_0019, 9, 619, 382, Pic_0020, 114, 625, 391, Pic_0021, 9, 734, 384, Pic_0022, 25, 570, 385, Pic_0023, 7, 579, 392, Pic_0024, 25, 570, 385, Pic_0025, 46, 557, 370,
Pic_0015, 8, 744, 390, Pic_0026, 8, 744, 390, Pic_0027, 8, 744, 390, Pic_0028, 10, 743, 390, Pic_0029, 8, 744, 390, Pic_0030, 8, 744, 390, Pic_0031, 8, 744, 390, Pic_0032, 9, 744, 390, Pic_0033, 8, 744, 390, Pic_0034, 8, 744, 397,
Pic_0014, 14, 220, 390, Pic_0015, 8, 210, 390, Pic_0015, 8, 200, 390, Pic_0016, 5, 193, 390, Pic_0014, 14, 213, 390, Pic_0015, 8, 203, 390, Pic_0015, 8, 193, 390, Pic_0014, 14, 203, 390, Pic_0017, 140, 48, 391, Pic_0018, 25, 48, 391,
Pic_0019, 9, 67, 382, Pic_0020, 114, 73, 391, Pic_0021, 9, 182, 384, Pic_0035, 26, 17, 385, Pic_0036, 26, 17, 385, Pic_0015, 8, 192, 390, Pic_0026, 8, 192, 390, Pic_0027, 8, 192, 390, Pic_0028, 10, 191, 390, Pic_0029, 8, 192, 390,
Pic_0030, 8, 192, 390, Pic_0031, 8, 192, 390, Pic_0032, 9, 192, 390, Pic_0033, 8, 192, 390, Pic_0034, 8, 192, 397, Pic_0037, 184, 309, 380, Pic_0038, 191, 304, 384, Pic_0039, 89, 370, 384, Pic_0040, 9, 455, 375, Pic_0041, 44, 327, 384,
Pic_0042, 12, 322, 376, Pic_0043, 39, 313, 405, Pic_0044, 29, 454, 405, Pic_0045, 54, 249, 412, Pic_0046, 40, 608, 132, Pic_0047, 494, 264, 95, Pic_0048, 143, 610, 229, Pic_0049, 23, 652, 274, Pic_0050, 23, 648, 165, Pic_0051, 40, 152, 132,
Pic_0052, 493, 44, 95, Pic_0053, 141, 49, 229, Pic_0054, 23, 126, 274, Pic_0055, 24, 128, 165, Pic_0056, 800, 0, 47, Pic_0057, 47, 376, 336, Pic_0058, 103, 458, 206, Pic_0058, 103, 348, 206, Pic_0058, 103, 238, 206, Pic_0059, 20, 418, 206,
Pic_0059, 20, 390, 206, Pic_0059, 20, 362, 206, Pic_0060, 103, 348, 206, Pic_0061, 103, 348, 206, Pic_0062, 103, 348, 206, Pic_0063, 103, 348, 206, Pic_0064, 103, 348, 206, Pic_0065, 103, 348, 206, Pic_0066, 103, 348, 206, Pic_0067, 103, 348, 206,
Pic_0068, 50, 375, 225, Pic_0069, 28, 750, 68, Pic_0070, 12, 730, 68, Pic_0071, 3, 725, 81, Pic_0070, 12, 711, 68, Pic_0070, 12, 698, 68, Pic_0070, 12, 685, 68, Pic_0072, 47, 630, 68, Pic_0072, 47, 643, 68, Pic_0072, 47, 656, 68,
Pic_0073, 7, 687, 68, Pic_0074, 11, 686, 68, Pic_0075, 12, 685, 68, Pic_0076, 13, 685, 68, Pic_0077, 12, 685, 68, Pic_0078, 12, 685, 68, Pic_0079, 11, 686, 68, Pic_0080, 12, 685, 68, Pic_0081, 12, 685, 68, Pic_0082, 12, 685, 77,
Pic_0083, 29, 164, 68, Pic_0083, 29, 151, 68, Pic_0083, 29, 138, 68, Pic_0083, 29, 125, 68, Pic_0083, 29, 112, 68, Pic_0083, 29, 99, 68, Pic_0070, 12, 144, 68, Pic_0070, 12, 131, 68, Pic_0070, 12, 118, 68, Pic_0070, 12, 105, 68,
Pic_0070, 12, 92, 68, Pic_0070, 12, 79, 68, Pic_0084, 48, 23, 68, Pic_0073, 7, 81, 68, Pic_0074, 11, 80, 68, Pic_0075, 12, 79, 68, Pic_0076, 13, 79, 68, Pic_0077, 12, 79, 68, Pic_0078, 12, 79, 68, Pic_0079, 11, 80, 68,
Pic_0080, 12, 79, 68, Pic_0081, 12, 79, 68, Pic_0082, 12, 79, 77, Pic_0085, 81, 360, 69, Pic_0086, 50, 375, 69, Pic_0087, 103, 349, 69, Pic_0088, 40, 737, 15, Pic_0089, 33, 738, 16, Pic_0090, 27, 695, 10, Pic_0091, 21, 658, 9,
Pic_0092, 28, 540, 10, Pic_0093, 36, 489, 10, Pic_0094, 31, 443, 8, Pic_0095, 46, 383, 14, Pic_0096, 30, 339, 10, Pic_0097, 32, 292, 9, Pic_0098, 32, 245, 10, Pic_0099, 38, 195, 11, Pic_0100, 15, 629, 19, Pic_0100, 15, 613, 19,
Pic_0101, 15, 613, 14, Pic_0101, 15, 597, 14, Pic_0102, 15, 581, 25, Pic_0103, 15, 581, 20, Pic_0104, 8, 600, 14, Pic_0105, 14, 598, 14, Pic_0106, 15, 597, 14, Pic_0107, 16, 597, 14, Pic_0108, 15, 597, 14, Pic_0109, 15, 597, 14,
Pic_0110, 14, 597, 14, Pic_0111, 15, 597, 14, Pic_0112, 15, 597, 14, Pic_0102, 15, 597, 25, Pic_0113, 14, 78, 15, Pic_0113, 14, 62, 15, Pic_0114, 4, 56, 21, Pic_0113, 14, 39, 15, Pic_0113, 14, 23, 15, Pic_0115, 8, 25, 15,
Pic_0116, 14, 23, 15, Pic_0117, 14, 23, 15, Pic_0118, 16, 22, 15, Pic_0119, 14, 23, 15, Pic_0120, 14, 23, 15, Pic_0121, 13, 23, 15, Pic_0122, 14, 23, 15, Pic_0123, 14, 23, 15, Pic_0124, 14, 23, 27, Pic_0125, 800, 0, 0,
Pic_0126, 800, 0, 0, Pic_0127, 800, 0, 0, Pic_0128, 800, 0, 0, Pic_0129, 800, 0, 0, Pic_0130, 800, 0, 0, Pic_0131, 800, 0, 0, Pic_0132, 800, 0, 0, Pic_0133, 800, 0, 0, Pic_0134, 800, 0, 0, Pic_0135, 800, 0, 0,
Pic_0136, 800, 0, 0, Pic_0137, 800, 0, 0, Pic_0138, 800, 0, 0, Pic_0139, 800, 0, 0, Pic_0140, 800, 0, 0, Pic_0141, 800, 0, 0, Pic_0142, 800, 0, 0, Pic_0143, 800, 0, 0, Pic_0144, 800, 0, 0, Pic_0145, 800, 0, 0,
Pic_0146, 800, 0, 0, Pic_0147, 800, 0, 0, Pic_0148, 800, 0, 0, Pic_0149, 800, 0, 0, Pic_0150, 800, 0, 0, Pic_0151, 800, 0, 0, Pic_0152, 800, 0, 0, Pic_0153, 800, 0, 0, Pic_0154, 800, 0, 0, Pic_0155, 800, 0, 0,
Pic_0156, 800, 0, 0, Pic_0157, 800, 0, 0, Pic_0158, 800, 0, 0, Pic_0159, 800, 0, 0, Pic_0160, 800, 0, 0, Pic_0161, 800, 0, 0, Pic_0162, 800, 0, 0, Pic_0163, 800, 0, 0, Pic_0164, 800, 0, 0, Pic_0165, 800, 0, 0,
Pic_0166, 800, 0, 0, Pic_0167, 800, 0, 0, Pic_0168, 800, 0, 0, Pic_0169, 800, 0, 0, Pic_0170, 800, 0, 0, Pic_0171, 800, 0, 0, Pic_0172, 800, 0, 0, Pic_0173, 800, 0, 0, Pic_0174, 800, 0, 0, Pic_0175, 800, 0, 0,
Pic_0176, 800, 0, 0, Pic_0177, 800, 0, 0, Pic_0178, 800, 0, 0, Pic_0179, 800, 0, 0, Pic_0180, 800, 0, 0, Pic_0181, 800, 0, 0, Pic_0182, 800, 0, 0, Pic_0183, 800, 0, 0, Pic_0184, 800, 0, 0, Pic_0185, 800, 0, 0,
Pic_0186, 800, 0, 0, Pic_0187, 800, 0, 0, Pic_0188, 800, 0, 0, Pic_0189, 800, 0, 0, Pic_0190, 800, 0, 0, Pic_0191, 800, 0, 0, Pic_0192, 800, 0, 0, Pic_0193, 800, 0, 0, Pic_0194, 800, 0, 0, Pic_0195, 800, 0, 0,
Pic_0196, 800, 0, 0, Pic_0197, 800, 0, 0, Pic_0198, 800, 0, 0, Pic_0199, 800, 0, 0, Pic_0200, 800, 0, 0, Pic_0201, 800, 0, 0, Pic_0202, 800, 0, 0, Pic_0203, 800, 0, 0, Pic_0204, 800, 0, 0, Pic_0205, 800, 0, 0,
Pic_0206, 800, 0, 0, Pic_0207, 800, 0, 0, Pic_0208, 800, 0, 0, Pic_0209, 800, 0, 0, Pic_0210, 800, 0, 0, Pic_0211, 800, 0, 0, Pic_0212, 800, 0, 0, Pic_0213, 800, 0, 0, Pic_0214, 800, 0, 0, Pic_0215, 800, 0, 0,
Pic_0216, 800, 0, 0, Pic_0217, 800, 0, 0, Pic_0218, 800, 0, 0, Pic_0219, 800, 0, 0, Pic_0220, 800, 0, 0, Pic_0221, 800, 0, 0, Pic_0222, 800, 0, 0, Pic_0223, 800, 0, 0, Pic_0224, 800, 0, 0, Pic_0225, 800, 0, 0,
Pic_0226, 800, 0, 0, Pic_0227, 800, 0, 0, Pic_0228, 800, 0, 0, Pic_0229, 800, 0, 0, Pic_0230, 800, 0, 0, Pic_0231, 800, 0, 0, Pic_0232, 800, 0, 0, Pic_0233, 800, 0, 0, Pic_0234, 800, 0, 0, Pic_0235, 800, 0, 0,
Pic_0236, 800, 0, 0, Pic_0237, 800, 0, 0, Pic_0238, 800, 0, 0, Pic_0239, 800, 0, 0, Pic_0240, 800, 0, 0, Pic_0241, 800, 0, 0, Pic_0242, 800, 0, 0, Pic_0243, 800, 0, 0, Pic_0244, 800, 0, 0, Pic_0245, 800, 0, 0,
Pic_0246, 800, 0, 0, Pic_0247, 800, 0, 0, Pic_0248, 800, 0, 0, Pic_0249, 800, 0, 0, Pic_0250, 800, 0, 0, Pic_0251, 800, 0, 0, Pic_0252, 800, 0, 0, Pic_0253, 800, 0, 0, Pic_0254, 800, 0, 0, Pic_0255, 800, 0, 0,
Pic_0256, 800, 0, 0, Pic_0257, 800, 0, 0, Pic_0258, 800, 0, 0, Pic_0259, 800, 0, 0, Pic_0260, 800, 0, 0, Pic_0261, 800, 0, 0, Pic_0262, 800, 0, 0, Pic_0263, 800, 0, 0, Pic_0264, 800, 0, 0, Pic_0265, 800, 0, 0,
Pic_0266, 800, 0, 0, Pic_0267, 800, 0, 0, Pic_0268, 800, 0, 0,
};
#define PicIndexData_LEN 14888
//uint32_t PicIndexDataLEN = 0;
void User_PicIndexDataInit(void)
{
//PicIndexDataLEN = sizeof(PicIndexData);
SetPicIndexData((uint8_t *)PicIndexData, sizeof(PicIndexData), PIC_INDEX_DATA_CRC);
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -17,11 +17,14 @@
#include "GenDelay\GenDelay.h"
#include "GpioUser.h"
#include "Eeprom\eepromManage.h"
#include "CommonInterface.h"
#include "Application\CommonInterface.h"
#include "Menu\Menu.h"
#include "Flash_synchronizer\Flash_synchronizer.h"
#include "AMT630H\AMT630H.h"
#include "AMT630H\PicBin.h"
#include "AMT630H\UartProtocol.h"
#include "AMT630H\AMT630H_Datas.h"
#include "Data_ESpeed.h"
#include "Data_VSpeed.h"
#endif
......@@ -207,10 +207,7 @@ void Key_Auto_Save(void)
PageType = Page_Time;
}
void MenuData_Unit_Init(void)
{
MenuData.Unit = 0;
}
uint8_t ClearODO_Flag = 0;
void TYW_RESET_ODO(void)
......
......@@ -78,5 +78,5 @@ uint8_t Get_Current_PageType(void);
void TYW_RESET_ODO(void);
uint8_t Get_Dis_Unit(void);
void Key_Check_Service(void);
void MenuData_Unit_Init(void);
#endif
......@@ -39,31 +39,32 @@ void PwrMemInit(void)
static void Power_KL30_Init(void)
{
// ClearODO_Flag = 0;
UART_Channel_Config_st_t loc_config;
Gpio_Init(Gpio_KL30_Init);
eeprom_StoreInfo_Init();
loc_config.u32UARTChEn = 1U;
loc_config.u32UARTbps = 115200U;
loc_config.pfnUARTConfirmCallBack = NULL;
loc_config.pfnUARTReadMsgCallBack = Amt630hUartRecvData;
RTE_UART_Init(UART_CH2, &loc_config);
Analog_Signal_Conv_Init();
BackLight_Init();
// Sys_KL30_Init();
// Checkself_Init();
BackLight_Init();
Sys_KL30_Init();
Data_Vehicle_Speed_KL30_Wakeup_Init();
Data_Engine_Speed_KL30_Wakeup_Init();
// LINE_IN_Init();
Key_KL30_Init_EXample();
LINE_IN_Init();
Key_KL30_Init_EXample();
Data_User_Mileage_KL30Init();
Fuel_KL30_Init();
Fuel_KL30_Init();
Amt630hInit();
TimerM_PWM_counter_Output_Init(TIMERM_COUNTER1, 400, 64000000);
TimerM_PWM_CH_Output_init(TIMERM_COUNTER1, TIMERM_CHB, ActiveLevel_High);
TimerM_PWM_counter_Output_Init(TIMERM_COUNTER1, 400, 64000000);
TimerM_PWM_CH_Output_init(TIMERM_COUNTER1, TIMERM_CHB, ActiveLevel_High);
// Telltales_Init();
// MenuData_Unit_Init();
// g_stRTCInformation.u8RTCSecond = 0;
// g_stRTCInformation.u8RTCMinute = 0;
// g_stRTCInformation.u8RTCHour = 0;
......@@ -73,6 +74,7 @@ static void Power_KL30_Init(void)
// RTE_RTC_Init(g_stRTCInformation);
// RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising);
Protocol_KL30_Wakeup_Init();
}
//extern uint32_t PowerIgnOffTimeLine;
static void Power_Wakeup_Init(void)
......@@ -86,17 +88,17 @@ static void Power_Wakeup_Init(void)
Data_User_Mileage_WakeupInit();
BackLight_Init();
// Sys_WakeUp_Init();
Data_Vehicle_Speed_KL30_Wakeup_Init();
Data_Engine_Speed_KL30_Wakeup_Init();
// LINE_IN_Init();
Sys_WakeUp_Init();
Data_Vehicle_Speed_KL30_Wakeup_Init();
Data_Engine_Speed_KL30_Wakeup_Init();
LINE_IN_Init();
Key_Wakeup_Init_EXample();
Line_In_KL15_ON_Init();
Fuel_KL30_Init();
Amt630hInit();
TimerM_PWM_counter_Output_Init(TIMERM_COUNTER1, 400, 64000000);
TimerM_PWM_CH_Output_init(TIMERM_COUNTER1, TIMERM_CHB, ActiveLevel_High);
// Telltales_Init();
//Telltales_Init();
// RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising);
Protocol_KL30_Wakeup_Init();
}
......@@ -137,7 +139,7 @@ static void Power_Sleep_Init(void)
// //CGC->CSC = 1 ; //HIOSTOP = 1
Gpio_Init(Gpio_Sleep_Init);
AMT630H_Sleep();
Analog_Signal_Conv_Stop();
// RTE_DEEPSLEEP_Enable();
......
This diff is collapsed.
#include "System_Monitor.h"
#include "Components.h"
#include "delay.h"
#include "wdt.h"
#define u16Base_Vol 0u
#define u16ENTER_LOW_N_RANGE 7000U
#define u16EXIT_LOW_N_RANGE 7500U
#define u16ENTER_LOW_Y_RANGE 9000U
#define u16EXIT_LOW_Y_RANGE 10000U
#define u16Base_Vol 0u
#define u16ENTER_LOW_N_RANGE 7000U
#define u16EXIT_LOW_N_RANGE 8000U
#define u16ENTER_LOW_Y_RANGE 9000U
#define u16EXIT_LOW_Y_RANGE 10000U
#define u16EXIT_HIGH_Y_RANGE 15000U
#define u16ENTER_HIGH_Y_RANGE 16000U
#define u16EXIT_HIGH_N_RANGE 18000U
#define u16ENTER_HIGH_N_RANGE 19000U
#define u16Top_Vol 0xffffu
#define u16EXIT_HIGH_Y_RANGE 0xffffu
#define u16ENTER_HIGH_Y_RANGE 0xffffu
#define u16EXIT_HIGH_N_RANGE 0xffffu
#define u16ENTER_HIGH_N_RANGE 0xffffu
#define u16Top_Vol 0xffffu
void Delay_ms(uint32_t u32Ms);
// #pragma alignvar(8)
static const monitorlib_uint16_t SysFun_Range[24u] = {
static const monitorlib_uint16_t SysFun_Range [ 26u ] = {
u16Base_Vol,
u16ENTER_LOW_N_RANGE,
......@@ -34,8 +35,8 @@ static const monitorlib_uint16_t SysFun_Range[24u] = {
u16ENTER_HIGH_N_RANGE,
u16Top_Vol,
500, /* 进入异常电压时间 1S */
50u, /* KL15消抖时间 100ms*/
2500,
50u,
u16Base_Vol,
u16ENTER_LOW_N_RANGE,
......@@ -53,33 +54,36 @@ static const monitorlib_uint16_t SysFun_Range[24u] = {
u16Top_Vol,
2u,
2u,
2u,
0u,
};
monitorlib_uint16_t Sys_Read_KL30_Voltage_F(void)
{
monitorlib_uint16_t u16Voltage;
u16Voltage = ADC_Conv_Single_Channel(ADC_CH_KL30_VOLTAGE);
u16Voltage = (monitorlib_uint16_t)ADC_Conv_Single_Channel(ADC_CH_KL30_VOLTAGE);
return u16Voltage;
}
monitorlib_uint16_t Sys_Read_KL15_Voltage_F(void)
{
monitorlib_uint16_t u16Voltage;
u16Voltage = ADC_Conv_Single_Channel(ADC_CH_KL15_VOLTAGE);
u16Voltage = (monitorlib_uint16_t)ADC_Conv_Single_Channel(ADC_CH_KL15_VOLTAGE);
return u16Voltage;
}
monitorlib_uint16_t Sys_Read_KL30_Voltage(void)
{
monitorlib_uint16_t u16Voltage;
u16Voltage = ADC_Read_Signal(ADC_CH_KL30_VOLTAGE);
u16Voltage = (monitorlib_uint16_t)ADC_Read_Signal(ADC_CH_KL30_VOLTAGE);
return u16Voltage;
}
monitorlib_uint16_t Sys_Read_KL15_Voltage(void)
{
monitorlib_uint16_t u16Voltage;
u16Voltage = ADC_Read_Signal(ADC_CH_KL15_VOLTAGE);
u16Voltage = (monitorlib_uint16_t)ADC_Read_Signal(ADC_CH_KL15_VOLTAGE);
return u16Voltage;
}
......@@ -99,17 +103,20 @@ monitorlib_uint8_t Sys_Read_KL15_Valid(void)
monitorlib_uint8_t System_LINE_KL15(void)
{
monitorlib_uint8_t u8KL15 = 0;
// if (RTE_GPIO_Get_Level(WAKEUP_KL15_In) == 1u )
// {
// u8KL15 = 1u;
// }
// else
// {
// u8KL15 = 0;
// }
static monitorlib_uint8_t u8KL15 = 0;
if (Sys_Read_KL15_Voltage() >= 5500u )
{
u8KL15 = 1u;
}
else if((Sys_Read_KL15_Voltage() >= 5000u)&&(Sys_Read_KL15_Voltage() < 5500u))
{
;
}
else
{
u8KL15 = 0;
}
return u8KL15;
}
......@@ -125,33 +132,33 @@ void Sys_LogicProcess(void)
void Sys_KL30_Init(void)
{
MonitorExt_st m_st;
m_st.COM_Delay = Common_BlockDelay;
m_st.SysGet_KL15Line = System_LINE_KL15;
m_st.SysGet_KL15_Valid = Sys_Read_KL15_Valid;
m_st.SysGet_KL30_Valid = Sys_Read_KL30_Valid;
m_st.SysGet_KL15_value = Sys_Read_KL15_Voltage;
m_st.SysGet_KL30_value = Sys_Read_KL30_Voltage;
m_st.COM_Delay = Common_BlockDelay;
m_st.SysGet_KL15Line = System_LINE_KL15;
m_st.SysGet_KL15_Valid = Sys_Read_KL15_Valid;
m_st.SysGet_KL30_Valid = Sys_Read_KL30_Valid;
m_st.SysGet_KL15_value = Sys_Read_KL15_Voltage;
m_st.SysGet_KL30_value = Sys_Read_KL30_Voltage;
m_st.SysGet_KL15_value_Force = Sys_Read_KL15_Voltage_F;
m_st.SysGet_KL30_value_Force = Sys_Read_KL30_Voltage_F;
m_st.SysMonitorLogic = Sys_LogicProcess;
System_Monitor_KL30Init();
m_st.SysMonitorLogic = Sys_LogicProcess;
Sys_Set_Pata(SysFun_Range, &m_st);
System_Monitor_KL30Init( );
}
void Sys_WakeUp_Init(void)
{
MonitorExt_st m_st;
m_st.COM_Delay = Common_BlockDelay;
m_st.SysGet_KL15Line = System_LINE_KL15;
m_st.SysGet_KL15_Valid = Sys_Read_KL15_Valid;
m_st.SysGet_KL30_Valid = Sys_Read_KL30_Valid;
m_st.SysGet_KL15_value = Sys_Read_KL15_Voltage;
m_st.SysGet_KL30_value = Sys_Read_KL30_Voltage;
m_st.COM_Delay = Common_BlockDelay;
m_st.SysGet_KL15Line = System_LINE_KL15;
m_st.SysGet_KL15_Valid = Sys_Read_KL15_Valid;
m_st.SysGet_KL30_Valid = Sys_Read_KL30_Valid;
m_st.SysGet_KL15_value = Sys_Read_KL15_Voltage;
m_st.SysGet_KL30_value = Sys_Read_KL30_Voltage;
m_st.SysGet_KL15_value_Force = Sys_Read_KL15_Voltage_F;
m_st.SysGet_KL30_value_Force = Sys_Read_KL30_Voltage_F;
m_st.SysMonitorLogic = Sys_LogicProcess;
System_Monitor_WakeupInit();
m_st.SysMonitorLogic = Sys_LogicProcess;
Sys_Set_Pata(SysFun_Range, &m_st);
System_Monitor_WakeupInit( );
}
void Delay_ms(uint32_t u32Ms)
......@@ -167,6 +174,6 @@ void Delay_ms(uint32_t u32Ms)
__NOP();
__NOP();
}
RTE_WDT_Clear();
WDT_Restart();
}
}
......@@ -4,5 +4,6 @@
void Sys_KL30_Init(void);
void Sys_WakeUp_Init(void);
monitorlib_uint16_t Sys_Read_KL15_Voltage(void);
#endif
......@@ -36,8 +36,8 @@
//Tellib_uint8_t Tel_Mem [ Tel_MEM_Block_Size * LED_Max + Tel_MEM_Block_Addition ];
//void Telltales_Init(void)
//{
// void Telltales_Init(void)
// {
// TelExtPara m_ExtPara;
// m_ExtPara.TotalLength = LED_Max;
// m_ExtPara.LED_PowerOFF_TimerCbk = Common_GetIgnOffTime;
......@@ -45,7 +45,7 @@
// m_ExtPara.LED_PowerCbk = Common_Get_IG_Sts;
// u8CanId401Flag = 0;
// Telltales_KL30_Wakeup_Init(Tel_Mem, LED_Attribute, &m_ExtPara);
//}
// }
//void Can_ID_401(uint8_t CopyData [])
......
......@@ -17,8 +17,7 @@
//extern Tellib_uint8_t Auto_Start_Stop ;
//void Telltales_Init(void);
//void Telltales_Auto_Start_Stop(void);
//void Telltales_Auto_Start_Stop_Setting(void);
//Tellib_uint8_t Telltales_Voltage_Date(void);
//#endif
......@@ -193,6 +193,9 @@ uint32_t RTE_UART_Init(UART_Channel_en_t enUARTCh, UART_Channel_Config_st_t *pen
stUART_InitStruct.bitorder = UART_Bit_LSB;
stUART_InitStruct.UART_Mode = UART_Mode_Rx | UART_Mode_Tx; //收发模式
stUARTCh2Cfg.pfnUARTReadMsgCallBack = penUARTCfg->pfnUARTReadMsgCallBack;
ISR_Register(ST2_IRQn, UART_CH2_TX_ISR); //串口2发送中断服务路径注册
ISR_Register(SR2_IRQn, UART_CH2_RX_ISR); //串口2接收中断服务路径注册
break;
......
......@@ -14,6 +14,7 @@ void Sys_2ms_Tasks(void)
Common_Input_Para();
Sys_Status_Update_Service();
Analog_Signal_Conv_Service();
AMT630H_Main();
}
void Sys_5ms_Tasks(void)
......@@ -38,6 +39,7 @@ void Sys_50ms_Tasks(void)
}
uint32_t g_u32LEDFlag = 0UL;
//uint8_t ljsuartsend[2] = { 0x55, 0x66};
void Sys_100ms_Tasks(void)
{
if (g_u32LEDFlag)
......@@ -51,8 +53,10 @@ void Sys_100ms_Tasks(void)
//RTE_GPIO_Set_Level(RTE_GPIO_ANALOG_PORT0_PIN15, 0x00U);
}
Fuel_Cal_Sevice(100u);
RTE_GPIO_Set_Level(Blacklight_PWM, 1);
//UART_Ch2_Send_Multiple_Byte(ljsuartsend, 2);
}
static uint16_t task_2ms = 0u;
void Sys_Exact_50us_Tasks(void)
{
static uint32_t task_1ms = 0u;
......@@ -64,4 +68,11 @@ void Sys_Exact_50us_Tasks(void)
task_1ms =0U;
eeprom_1ms_timeCount( );
}
task_2ms++;
if (task_2ms >= 40)
{
task_2ms = 0;
AMT630H_Timer(2);
}
}
\ No newline at end of file
......@@ -58,23 +58,11 @@ void Sys_Startup_Pre_Init(void)
void Sys_Startup_Init(void)
{
uint8_t u8StartupMode = 0U;
uint8_t test_uart_txbuf[5]={1,2,3,4,5};
UART_Channel_Config_st_t loc_config;
UART_Channel_Config_st_t loc_config;
RTE_WDT_Enable();
GenDelay_Init(RTE_WDT_Clear);
RTE_GPIO_Init();
Gpio_Init(Gpio_KL30_Init);
Analog_Signal_Conv_Init();
loc_config.u32UARTChEn = 1U;
loc_config.u32UARTbps = 115200U;
loc_config.pfnUARTConfirmCallBack = NULL;
loc_config.pfnUARTReadMsgCallBack = NULL;
RTE_UART_Init(UART_CH2, &loc_config);
//RTE_CAPTURE_KL30_Init();
Gen_TimeDelay(10000u, 50u);
PwrMemInit( );
Power_Management_Init(u8StartupMode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment