瀏覽代碼

rv32/rtc: log bytes read for RTC, for card bringup

Help card bringup testing by dumping the bytes read from the RTC chip.
H. Peter Anvin 1 年之前
父節點
當前提交
67b4ddafc1
共有 12 個文件被更改,包括 9 次插入4 次删除
  1. 二進制
      esp32/output/max80.ino.bin
  2. 2 2
      fpga/max80.qpf
  3. 二進制
      fpga/output/bypass.jic
  4. 二進制
      fpga/output/max80.fw
  5. 二進制
      fpga/output/v1.fw
  6. 二進制
      fpga/output/v1.jic
  7. 二進制
      fpga/output/v1.sof
  8. 二進制
      fpga/output/v2.fw
  9. 二進制
      fpga/output/v2.jic
  10. 二進制
      fpga/output/v2.sof
  11. 1 1
      rv32/checksum.h
  12. 6 1
      rv32/rtc.c

二進制
esp32/output/max80.ino.bin


+ 2 - 2
fpga/max80.qpf

@@ -19,12 +19,12 @@
 #
 # Quartus Prime
 # Version 22.1std.2 Build 922 07/20/2023 SC Lite Edition
-# Date created = 18:24:17  September 30, 2023
+# Date created = 18:46:49  September 30, 2023
 #
 # -------------------------------------------------------------------------- #
 
 QUARTUS_VERSION = "22.1"
-DATE = "18:24:17  September 30, 2023"
+DATE = "18:46:49  September 30, 2023"
 
 # Revisions
 

二進制
fpga/output/bypass.jic


二進制
fpga/output/max80.fw


二進制
fpga/output/v1.fw


二進制
fpga/output/v1.jic


二進制
fpga/output/v1.sof


二進制
fpga/output/v2.fw


二進制
fpga/output/v2.jic


二進制
fpga/output/v2.sof


+ 1 - 1
rv32/checksum.h

@@ -1,4 +1,4 @@
 #ifndef CHECKSUM_H
 #define CHECKSUM_H
-#define SDRAM_SUM 0x17cbe205
+#define SDRAM_SUM 0x26731e5a
 #endif

+ 6 - 1
rv32/rtc.c

@@ -98,15 +98,20 @@ void read_rtc(void)
     int i;
     struct tms tms;
 
+    con_puts("RTC read: ");
+
     if (i2c_start_rtc())
 	return;
 
     i2c_send(0, I2C_SR);	/* Starting register */
     i2c_send(RTC_RCMD, 0);
 
-    for (i = 0; i < RTC_TIME_REGS-1; i++)
+    for (i = 0; i < RTC_TIME_REGS-1; i++) {
 	rtc_regs[i] = i2c_recv(0);
+	con_printf("%02x ", rtc_regs[i]);
+    }
     rtc_regs[i] = i2c_recv(I2C_NAK | I2C_P);
+    con_printf("%02x\n", rtc_regs[i]);
 
     /* Convert to struct tms and set systime */
     memset(&tms, 0, sizeof tms);