litex-hub / litex-boards

LiteX boards files
BSD 2-Clause "Simplified" License
376 stars 285 forks source link

Tang nano internal uart chip #290

Closed troibe closed 2 years ago

troibe commented 3 years ago

As a follow up to https://github.com/litex-hub/litex-boards/pull/280 I tried getting uartbone to work on the tang nano. Using an external ftdi chip this works as expected. However using the internal ch552 uart chip I didn't get it to work. Other projects mention (like this one https://github.com/kingyoPiyo/Tang-Nano_I2C_Monitor) that the firmware of the ch552 needs to be updated first. However that alone didn't do the trick for me. As loopback is working using the ch552 I'm a bit confused as to what could be interferring with the uart communication.

enjoy-digital commented 2 years ago

Hi @developandplay,

I just updated the CH552 firmware on my Tang Nano and reproduced the issue you had (working loopback/failing UARTBone) and got it with https://github.com/litex-hub/litex-boards/commit/184f41e61a4d0d0e7e1060485ff852cbcd727ab9.

There seems to be a couple of quirks:

With this, the UARTBone bridge operate correctly (tested with litex_cli --write/--read//--regs). Could you also do a test on your side and tell me if you reproduce these results?

troibe commented 2 years ago

Awesome work! That works for me as well. :partying_face:

enjoy-digital commented 2 years ago

Great, thanks for the feedback.