Browse Source

[Improve][AX80][main / Module_Alarm]

2022.10.27 / Folus Wen

Actions:
1. QCA7000 only power up when gun connected.
2. QCA7000 driver load and self test timming fine tune.

Files:
1. As follow commit history

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

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
Folus Wen 2 years ago
parent
commit
2befc684ef
2 changed files with 6 additions and 2 deletions
  1. 3 1
      EVSE/Projects/AX80/Apps/Module_AlarmDetect.c
  2. 3 1
      EVSE/Projects/AX80/Apps/main.c

+ 3 - 1
EVSE/Projects/AX80/Apps/Module_AlarmDetect.c

@@ -294,15 +294,17 @@ int qca7000FlashCheck()
 	char buf[256];
 	FILE *fp;
 
+	system("echo 1 > /sys/class/gpio/gpio115/value");
 	fp = popen("/usr/bin/plcID", "r");
 	if(fp != NULL)
 	{
 		while(fgets(buf, sizeof(buf), fp) != NULL)
 		{
-			if(strlen(buf) >= 10)result = PASS;
+			if(strlen(buf) >= 30)result = PASS;
 		}
 	}
 	pclose(fp);
+	system("echo 0 > /sys/class/gpio/gpio115/value");
 
 	return result;
 }

+ 3 - 1
EVSE/Projects/AX80/Apps/main.c

@@ -2945,6 +2945,8 @@ int InitQca7000()
 	int result = PASS;
 	system("/sbin/rmmod qcaspi");
 
+	gpio_set_value(GPIO_OUT_RST_QCA, ON);
+	sleep(2);
 	if(isKernelSupportNAT() == YES)
 		system("/sbin/insmod /lib/qcaspi_nat.ko");
 	else
@@ -2953,7 +2955,7 @@ int InitQca7000()
 	sleep(2);
 	system("/sbin/ifconfig eth1 192.168.0.11 netmask 255.255.255.0 up");
 	sleep(1);
-
+	gpio_set_value(GPIO_OUT_RST_QCA, OFF);
 	return result;
 }