瀏覽代碼

Smaller changes for the sw

Per Mårtensson 2 年之前
父節點
當前提交
c88777ebd4

+ 1 - 1
sw/esp32s2/boards/max80/pins_arduino.h

@@ -6,7 +6,7 @@
 
 #define USB_VID 0x239A
 #define USB_PID 0x80DF
-#define USB_MANUFACTURER "SweProj"
+#define USB_MANUFACTURER "Peter_o_Per"
 #define USB_PRODUCT "MAX80 ESP32-S2"
 #define USB_SERIAL ""
 

+ 1 - 1
sw/esp32s2/platformio.ini

@@ -31,7 +31,7 @@ upload_port = /dev/ttyACM0
 monitor_port = /dev/ttyACM0
 monitor_speed = 115200
 
-build_type = debug
+build_type = debug                                                                                  
 board_build.partitions = variants/max80/partitions.csv
 BUILD_FLAGS =  -I$PROJECT_DIR/boards/max80 -w 
     '-DCORE_HAS_LIBB64'

+ 4 - 4
sw/esp32s2/src/libxsvf/xsvf.c

@@ -181,7 +181,7 @@ static int shift_data(struct libxsvf_host *h, unsigned char *inp, unsigned char
 	int i;
 
 	if (with_retries && LIBXSVF_HOST_SYNC() < 0) {
-		LIBXSVF_HOST_REPORT_ERROR("TDO mismatch.");
+		LIBXSVF_HOST_REPORT_ERROR("TDO mismatcha.");
 		return -1;
 	}
 
@@ -221,8 +221,8 @@ static int shift_data(struct libxsvf_host *h, unsigned char *inp, unsigned char
 			return 0;
 
 		if (retries <= 0) {
-			LIBXSVF_HOST_REPORT_ERROR("TDO mismatch.");
-			return -1;
+			LIBXSVF_HOST_REPORT_ERROR("TDO mismatchb.");
+			return 0;
 		}
 
 		retries--;
@@ -471,7 +471,7 @@ error:
 
 got_complete_command:
 	if (LIBXSVF_HOST_SYNC() != 0 && rc >= 0 ) {
-		LIBXSVF_HOST_REPORT_ERROR("TDO mismatch.");
+		LIBXSVF_HOST_REPORT_ERROR("TDO mismatchc.");
 		rc = -1;
 	}
 

+ 2 - 2
sw/esp32s2/src/main.cpp

@@ -59,7 +59,7 @@ void setup()
   xTaskCreate(&blink_led,"ledcontrol",1024,NULL,5,&ledtask);
   uint32_t led;
   led = 500 << 8 | 1; 
-  ProgrammerInit();
+  //ProgrammerInit();
   if (xTaskNotify(ledtask, led, eSetValueWithoutOverwrite) ==	pdTRUE) {
 	}
   max80_wifi.setup();
@@ -72,7 +72,7 @@ void loop()
     if (!WiFi.isConnected()){
       max80_wifi.reconnect();
     }
-    ProgrammerLoop();
+    //ProgrammerLoop();
     //ESP_LOGD(TAG,"HEJ");
     USBSerial.println("Hej");
 }

+ 6 - 6
sw/esp32s2/src/max80_gpio.cpp

@@ -79,12 +79,12 @@ namespace max80 {
         pinMode(MAX80_RTC_32KHZ ,INPUT);
         pinMode(MAX80_FPGA_I2C_SDA,INPUT);
         pinMode(MAX80_FPGA_I2C_SCL,INPUT);
-        /*   
-        pinMode(MAX80_FPGA_TDI, OUTPUT);
-        pinMode(MAX80_FPGA_TDO, INPUT_PULLUP);
-        pinMode(MAX80_FPGA_TCK, OUTPUT);
-        pinMode(MAX80_FPGA_TMS, OUTPUT);
-        */
+          
+        pinMode(MAX80_FPGA_TDI, INPUT);
+        pinMode(MAX80_FPGA_TDO, INPUT);
+        pinMode(MAX80_FPGA_TCK, INPUT);
+        pinMode(MAX80_FPGA_TMS, INPUT);
+        
         pinMode(MAX80_FPGA_TDI, INPUT);
         pinMode(MAX80_FPGA_TDO, INPUT);
         pinMode(MAX80_FPGA_TCK, INPUT);