Forum Discussion
Intermittent DE10-Standard error starting GDB server with quartus_hps
Hello,
Thank you for the reply. We hooked up the miniUSB HPS UART and monitored it with: picocom -b 115200 --logfile /home/user/fpga/de10-serial.log /dev/ttyUSB0
1. We started running the quartus_hps test ('quartus_hps --cable="$FPGADEV" -o GDBSERVER --gdbport0=3212 --preloader=/opt/intelFPGA_lite/18.1/University_Program/Monitor_Program/arm_tools/u-boot-spl.de10-standard.srec --preloaderaddr=0xffff14f0'), power cycling the board, then running the OpenOCD test. When the preloader runs successfully through either program, HPS UART output shows:
U-Boot SPL 2013.01.01 (Aug 23 2017 - 12:18:56)
BOARD : Altera SOCFPGA Cyclone V Board
CLOCK: EOSC1 clock 25000 KHz
CLOCK: EOSC2 clock 25000 KHz
CLOCK: F2S_SDR_REF clock 0 KHz
CLOCK: F2S_PER_REF clock 0 KHz
CLOCK: MPU clock 925 MHz
CLOCK: DDR clock 400 MHz
CLOCK: UART clock 100000 KHz
CLOCK: MMC clock 50000 KHz
CLOCK: QSPI clock 370000 KHz
RESET: COLD
SDRAM: Initializing MMR registers
SDRAM: Calibrating PHY
SEQ.C: Preparing to start memory calibration
SEQ.C: CALIBRATION PASSED
SDRAM: 1024 MiB
2. After power cycling the board a number of times we eventually ran into the initial preloader issue described in the first post:
Info: Command: quartus_hps --cable="DE-SoC [1-10]" -o GDBSERVER --gdbport0=3212 --preloader=/opt/intelFPGA_lite/18.1/University_Program/Monitor_Program/arm_tools/u-boot-spl.de10-standard.srec --preloaderaddr=0xffff14f0
Current hardware is: DE-SoC [1-10]
Successfully change hardware frequency to 16Mhz
Found HPS at device 1
Double check JTAG chain
HPS Device IDCODE: 0x4BA00477
AHB Port is located at port 0
APB Port is located at port 1
Double check device identification ...
>>CPU0 halted at 0x2fa8.
>>Resetting HPS.
>>Downloading preloader.......
>>Program loaded. PC set to program entry (0xFFFF0000)
>>Setting vector base address register to: 0xffff0000
>>Running preloader.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
When running preloader HPS UART output endlessly prints:
IRQ triggered: Corrected OCRAM ECC
IRQ triggered: Corrected OCRAM ECC
IRQ triggered: Corrected OCRAM ECC
IRQ triggered: Corrected OCRAM ECC
IRQ triggered: Corrected OCRAM ECC
IRQ triggered: Corrected OCRAM ECC
IRQ triggered: Corrected OCRAM ECC
IRQ triggered: Corrected OCRAM ECC
IRQ triggered: Corrected OCRAM ECC
IRQ triggered: Corrected OCRAM ECC
[continues until quartus_hps process is killed]
3. When we see this issue, power cycle the board, and run the OpenOCD 'de10_run_preloader' test, it fails with:
fpgasoc.cpu.0: MPIDR level2 0, cluster 0, core 0, multi core, no SMT
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600001d3 pc: 0x00002fa8
MMU: disabled, D-Cache: disabled, I-Cache: enabled
de10: loading preloader u-boot-spl.de10-standard.srec into on-chip RAM
timed out while waiting for target halted
target halted in Thumb state due to debug-request, current mode: IRQ
cpsr: 0x400001f2 pc: 0xffff5c94
MMU: disabled, D-Cache: disabled, I-Cache: enabled
/home/user/fpga/test.tcl:60: Error: de10: preloader did not reach 0xffff14f0 (PC=0xffff5c94).
in procedure 'de10_run_preloader'
at file "/home/user/fpga/openocde_test.cfg", line 60
(Error message is from OpenOCD tcl file:
proc de10_hex {v} { return [format 0x%08x $v] }
proc de10_pc {} {
regexp {0x[0-9a-fA-F]+} [reg pc] pc
return [expr {$pc}]
}
[...]
bp 0xffff14f0 4 hw
resume 0xffff0000
set rc [catch { wait_halt 15000 } err]
rbp 0xffff14f0
if { $rc } {
halt 1000
error "de10: preloader did not reach [de10_hex $DE10_PRELOADER_DONE]\
(PC=[de10_hex [de10_pc]])."
}
Two side notes:
A) This issue shows up intermittently on many of our 14 DE10-Standard boards. The problem is it is so intermittent we haven't been able to log whether it happens on every single board or just some of them.
B) It seems that the OpenOCD errors in the previous post - Error: de10: preloader did not reach 0xffff14f0 (PC=0x00002fa8) - may be a separate (unrelated?) issue that shows up after using the HPS reset buttons between OpenOCD tests. We didn't see this issue show up again when power cycling between OpenOCD tests.
- tehjingy_Altera6 days ago
Regular Contributor
Hi,
Thank you for the UART capture.
From the UART Capture it could be two possibility, the tool JTAG-loaded SPL causes the ECC IRQ or the OCRAM itself is having an issue.
Could you try out the following:
When a board is in the failing state (after a failed JTAG preloader run), please try a normal SD-card boot of that same board (power cycle, boot from SD with a known-good image).
- If SD boot is solid while JTAG-loaded SPL hits the ECC IRQ storm, the problem is likely tied to the JTAG load / debug run path (OCRAM contents vs ECC state when the SPL enables OCRAM ECC).
- If SD boot also hits OCRAM ECC noise or hangs, that points more toward board/HPS OCRAM behavior on that unit.