HoneyGol-Microsystems / vesp-alpha

RISC-V based student processor for embedded applications.
GNU General Public License v3.0
3 stars 0 forks source link

fix GPIO B ports bug after reset #135

Closed medexs closed 10 months ago

medexs commented 11 months ago

After reset, the B ports stop working, but A ports still work.

andreondra commented 10 months ago

This is probably caused by bad GPIO design. Trying to fix it now by using IOBUFs and/or latching the incoming values.

andreondra commented 10 months ago

It looks like the bug is not associated with GPIOs at all. Even when all GPIO-related logic was removed, the bug still persisted.

Before reset, everything works correctly, but after reset all writes to GPIODIR_B are somehow "redirected" to GPIODIR_A. Suprisingly, if GPIODIR_B is moved to another "regsel address" (I tried moving it to address 000), it starts to work as expected. I suspect these weird bugs are caused by incorrectly applying reset. I will open another issue that will target reset-releated issues globally. In the related branch I'll only polish some stuff and close this issue.