GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Alexandre Oliva (lxo@snac.lx.oliva.nom.br)'s status on Friday, 13-Jun-2025 13:35:21 JST Alexandre Oliva Alexandre Oliva
    in reply to
    • Benjamin Stürmer :verified:
    • pedro 🍉
    heh, I was considering joking that it was Rust's object ownership semantics that required that, once you viewed what's on the screen, it had to be blanked out; I decided not to, because it wouldn't be useful, but since you've figured it out... the joke wasn't too far off

    interesting and useful to know that Rust's memory safety features can also bite

    CC: @bino@mastodon.cloud
    In conversation about 4 days ago from snac.lx.oliva.nom.br permalink
    • Embed this notice
      pedro 🍉 (ubik@fedi.turbofish.cc)'s status on Friday, 13-Jun-2025 13:35:22 JST pedro 🍉 pedro 🍉
      in reply to
      • Benjamin Stürmer :verified:

      @bino OH, I FOUND THE PROBLEM. I think this had already bit me in the ass once. Basically, in the framework I'm using (Embassy), whenever a pin structure is dropped (not sure if you're familiar with Rust, but that's when it goes out of scope), it resets the pin's config. I stored the pin in a parent struct, to make sure it stays in scope, and it now just works. So much time wasted trying to figure this one out... Anyway, thanks for your help!

      In conversation about 4 days ago permalink
    • Embed this notice
      pedro 🍉 (ubik@fedi.turbofish.cc)'s status on Friday, 13-Jun-2025 13:35:23 JST pedro 🍉 pedro 🍉
      in reply to
      • Benjamin Stürmer :verified:

      @bino so, I hooked up the logic analyzer and suddenly the whole thing started working. I narrowed it down to the screen's RST pin. If I leave it connected to the analyzer, it works. If I disconnect it, the whole thing turns white. I thought maybe some pull-up/pull-down effect might be going on, but this is just an output pin...

      In conversation about 4 days ago permalink
    • Embed this notice
      pedro 🍉 (ubik@fedi.turbofish.cc)'s status on Friday, 13-Jun-2025 13:35:24 JST pedro 🍉 pedro 🍉
      in reply to
      • Benjamin Stürmer :verified:

      @bino yeah, i have one of those logic analyzers, thanks! and no keep-alive is necessary AFAIK. thanks!

      In conversation about 4 days ago permalink
    • Embed this notice
      Benjamin Stürmer :verified: (bino@mastodon.cloud)'s status on Friday, 13-Jun-2025 13:35:25 JST Benjamin Stürmer :verified: Benjamin Stürmer :verified:
      in reply to
      • pedro 🍉

      @ubik 2 things came to my mind.
      1st check the CS PIN some inconsistency could "blank" the screen.
      2nd Is a keep-alive necessary? Some screens need "activity" to not go asleep.

      I remember using one of these for SPI, maybe a good "invest"

      https://de.aliexpress.com/item/1005003669762661.html

      good look

      In conversation about 4 days ago permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        404 page
    • Embed this notice
      pedro 🍉 (ubik@fedi.turbofish.cc)'s status on Friday, 13-Jun-2025 13:35:26 JST pedro 🍉 pedro 🍉

      I wrote some ST7789 screen driver Rust code which just takes bytes from memory and flushes them into the screen. It seems to work but somehow the screen turns completely white less than one second after the memory write operation. This used to work fine, so I was wondering if maybe some other driver was interfering with the SPI, but nope, I disabled everything else and it still does that. I wrote a small test program which uses a different library to speak to the ST, and it works just fine. I am probably doing something wrong somewhere, BUT THEN WHY WAS IT WORKING OK BEFORE? I suspect some weird timing issues. Or maybe my driver code is being optimized by the compiler somehow, and things are not being done in the correct order?

      I will probably plug in a logic analyzer tomorrow, but if anyone has any tips on how to debug it...

      #st7789 #embeddedrust #embedded #rust #electronics

      In conversation about 4 days ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.