Skip to content

HSTX Support for RP2350 #17111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sfe-SparkFro opened this issue Apr 10, 2025 · 2 comments
Open

HSTX Support for RP2350 #17111

sfe-SparkFro opened this issue Apr 10, 2025 · 2 comments
Labels
enhancement Feature requests, new feature implementations port-rp2

Comments

@sfe-SparkFro
Copy link
Contributor

Description

Would love for the RP2350's HSTX peripheral to be available in MicroPython! It provides an interface for outputting data ludicrously fast (8 GPIO pins (GPIO 12-19 only), DDR on each clock cycle, so up to 2.4Gbps without any overclocking), very useful for things like displays. Would be a part of the rp2 module, only on RP2350 boards (not supported on RP2040).

Section 12.11 of the RP2350 datasheet provides more details about the hardware. There are also a couple examples from the pico-examples repo.

As I understand it, basically just need to gpio_set_function(<GPIO 12-19>, GPIO_FUNC_HSTX), configure the hardware peripheral hstx_ctrl_hw (from hardware/structs/hstx_ctrl.h using macros from hardware/regs/hstx_ctrl.h), then send data to the FIFO buffer hstx_fifo_hw (from hardware/structs/hstx_fifo.h using macros from hardware/regs/hstx_fifo.h). I believe it's also possible to have the DMA feed the HSTX FIFO, DREQ_HSTX is a member of the DMA's dreq_num_rp2350, which should be made available in MicroPython.

Code Size

IMO this should always be enabled for RP2350 boards as part of the rp2 module, similar to the PIO and DMA features. Not expecting it to be very large.

Implementation

I hope the MicroPython maintainers or community will implement this feature

Code of Conduct

Yes, I agree

@sfe-SparkFro sfe-SparkFro added the enhancement Feature requests, new feature implementations label Apr 10, 2025
@jonnor
Copy link
Contributor

jonnor commented Apr 25, 2025

Hi and thank you for the feature request. It seems like a powerful peripheral. It will be interesting to see if anyone in the community is interested in implementing it :)

@mattytrentini
Copy link
Contributor

@MichaelBell has done a lot of the hard work here, he has created a MicroPython C++ user module that provides a DVI driver using HSTX. Pimoroni integrate it for their PicoVision.

See MichaelBell/dvhstx.

It should form a fantastic basis for a generic MicroPython driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests, new feature implementations port-rp2
Projects
None yet
Development

No branches or pull requests

3 participants