pico-playground icon indicating copy to clipboard operation
pico-playground copied to clipboard

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

Open sandric opened this issue 1 year ago • 5 comments

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 avatar Dec 31 '22 01:12 sandric