Skip to content
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

How to add usb printf to flash-stream dma example? #36

Open
sandric opened this issue Dec 31, 2022 · 5 comments
Open

How to add usb printf to flash-stream dma example? #36

sandric opened this issue Dec 31, 2022 · 5 comments

Comments

@sandric
Copy link

sandric commented Dec 31, 2022

I want to draw 640x320 display while also monitoring capacitive touch panel every ~5ms via i2c, so I tried to elaborate on flash-stream example, but failed just to print out smth through usb.

I tried adding second core entry to output usb string with 1 second delay, or vice versa - to move vga routine to second core, while outputting string in main one: in first case its just halts, in second while moving vga to second core - it manages to draw pictures normally but usb tty device not even recognized.

After debugging a bit - I found out that everything works just fine right until __no_inline_not_in_flash_func(flash_bulk_read) function is reached, and its first line ssi_hw->ssienr = 0; breaks it. I'm a newbie to pico and not familiar with this code.

So does anyone knows if its possible to use usb cdc for communication in this large pictures dma example and how to do it, or it is because pico uses all its resources to render images and have no compute power for usb stack (and potentially my i2c touch panel routine on top of it too)? Thx.

@sandric
Copy link
Author

sandric commented Jan 1, 2023

I also not sure how to use even UART though - since vga uses all pins with uart buses using gpio0-gpio17, here's my pinout I took from pico documentation:

Screenshot 2023-01-01 at 18-46-29 Hardware design with RP2040

Can someone share schematic to use UART communication with vga 5-5-5 DAC?

@lurch
Copy link
Contributor

lurch commented Jan 1, 2023

Can someone share schematic to use UART communication with vga 5-5-5 DAC?

See section 3.3.1. in https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf

@sandric
Copy link
Author

sandric commented Jan 2, 2023

@lurch thanks, I was able to use 20 and 21 pins for UART. It didn't helped much though making it work with vga output. I wasn't been able to run even blinking led loop normally with video output, its either no video or loop simply hangs, so I believe its just inherently broke in some way or pico power is just not enough for anything except rendering 640x480 image.
Not sure if issue should be closed, mb some update will be made on this in future.

@lurch
Copy link
Contributor

lurch commented Jan 2, 2023

I've personally not run any of these VGA examples, so can't offer help with those, but...

or pico power is just not enough for anything except rendering 640x480 image

Raspberry Pi Pico is powerful enough to run doom 😀

@sandric
Copy link
Author

sandric commented Jan 2, 2023

@lurch idk maybe if you write it in assembly or with pio for everything, which I'm not able to, and I'm still waiting to get simple answer how to get basic usb communication with this exact example and not seeing it..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants