Przeglądaj źródła

[Add][AW-CCS][main]

2021.07.10 / Folus Wen

Actions:
1. Enable GPIO1_31 as GPIO input for wake up button usage.

Files:
1. As follow commit history

Image version: D0.54.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 3 lat temu
rodzic
commit
0a071ebbf5

+ 6 - 0
EVSE/Projects/AW-CCS/Apps/main.c

@@ -40,6 +40,7 @@
 #define GPIO_OUT_RST_4G					114
 #define GPIO_OUT_RST_QCA				115
 #define GPIO_OUT_RST_ETH				89
+#define GPIO_IN_WAKEUP					63
 
 #define MtdBlockSize 					0x300000
 
@@ -1849,6 +1850,10 @@ void InitGPIO()
 	system("echo \"out\" > /sys/class/gpio/gpio62/direction");
 	system("echo 0 > /sys/class/gpio/gpio62/value");
 
+	/*Wake up button GPIO1_31 => H:ON; L:OFF*/
+	system("echo 63 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio64/direction");
+
 	sleep(1);
 	DEBUG_INFO("Initial GPIO OK\n");
 }
@@ -4577,6 +4582,7 @@ int main(void)
 			else
 			{
 				if((ShmCharger->gun_info[gun_index].GPIO_Input.Button_Mode_Switch == ON) ||
+				   (gpio_get_value(GPIO_IN_WAKEUP) == ON) ||
 				   (((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].SystemStatus == SYS_MODE_IDLE) || (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].SystemStatus == SYS_MODE_PREPARING)) &&
 					(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_B) &&
 					(DiffTimebWithNow(startTime[gun_index][TMR_IDX_POWERSAVING_STATE_B]) < 10000)))

+ 3 - 3
board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/common/autoboot.c

@@ -18,11 +18,11 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #if defined(MT29F16G08_BCH16)
-	#define uboot_version "02.01"
+	#define uboot_version "02.02"
 #elif defined(MT29F8G08_BCH16)
-	#define uboot_version "03.01"
+	#define uboot_version "03.02"
 #else
-	#define uboot_version "01.01"
+	#define uboot_version "01.02"
 #endif
 
 #define MAX_DELAY_STOP_STR 32