OpenOCD dmi_write not working, but C program's reg_write32 does?

Hello, I am trying to use OpenOCD to probe the registers of a simple memory-mapped peripheral (a GCD calculator) that I added to the Freedom Arty E310 platform.

I use the TLRegisterRouter function to define control and status registers for my peripheral starting at a base address of 0x10017000. This compiles and synthesizes to the FPGA, and I confirm from the regmap.json file that the register mappings look OK.

I write a C program in the freedom-e-sdk that uses the reg_write32 and reg_read32 functions to set the input registers to two numbers and peek output registers of the GCD. The results show what is expected, the GCD of the two values the program wrote to the input registers.

I am now trying out the same thing interactively, using OpenOCD over telnet to dmi_write the GCD’s input registers. It seems that I can write a 32-bit value to the first input register at 0x10017004 and read the value back. However, if I write to the second input register at 0x10017008 and read the value back, I only get 0x0.

Is there a reason why reg_write32 C commands seem to be working when compiled into a RISCV binary and uploaded using the freedom-e-sdk, but interactive OpenOCD dmi_write commands would not? Thank you.