rtstragedy2 [she/her, pup/pup's]

i’m back

  • 0 Posts
  • 118 Comments
Joined 7 months ago
cake
Cake day: August 6th, 2025

help-circle
  • not sure if full-size pi has this and if you’re talking about full size or the microcontrollers or not but the rp2350 has an HSTX interface which is DVI compatible (and somehow this means you can connect it up via HDMI). I think you’d need a rp2350 board that breaks out that peripheral though (not a Pico 2)

    I haven’t used it but I have had success with a pico 2 and using SPI for display transmission, a bunch of displays do support it if you need to save pins but it is of course slower. I had to isolate the MOSI wire and make it shorter to get it to 75MHz without glitching (I don’t think it actually runs at that speed but that’s the speed I set the SPI peri to) and it results in ~20-25ms to stream out a framebuffer using DMA (but that core is competing with a tragically synchronous sdmmc library)







  • I think I’ve finally turned a corner with embedded Rust, I tricked a Pi Pico 2 into playing NSF files!

    I’m scared of how many thousands of lines of code the NES emulator I had to write was, and for a while it felt like it was never going to be fast enough to run on a 150MHz processor, but some optimization that was within run-to-run variance on the benchmarks on my laptop must have really favoured the pico 2, and now there’s no dropouts!

    Lessons learned:

    • as far as I can tell, if you overflow stack on these microcontrollers you won’t get a fancy stack overflow error, it will just hard fault (although I suspect sometimes it won’t even fault and will just give you fun UB). Lost a day to that.
    • goddamn lifetimes and statics and interior mutability etc. caused me so much grief. There’s a crate called embedded_alloc which gives you access to Rc, Arc, Vec, etc by actually letting you define a heap. I highly recommend this although remember that when a Vec needs to grow it needs 3x it’s previous size in memory, because it creates a new Vec with 2x previous capacity, copies from the old Vec, then drops it.
    • I didn’t end up using both cores (yet) but Embassy doesn’t appear to support the doorbell IRQs or the inter-core FIFO queues, so if you want those you need to use rp-hal.
    • The embedded-sdmmc library certainly takes some getting used to. You need to implement long file name support yourself, no file sorting (do it yourself but use a master branch), use RawFile instead of File because it seems to be so ready to drop my files when I look the other way, etc.