Shop OBEX P1 Docs P2 Docs Learn Events
New SD mode P2 accessory board - Page 33 — Parallax Forums

New SD mode P2 accessory board

1272829303133»

Comments

  • evanhevanh Posts: 16,407
    edited 2025-04-20 13:49

    Uh-oh, one of my seven SD cards doesn't like it ... getting a busy timeout following the first write ...

    It's happy with the older v1.2 driver, so can't blame the card.

    Normal CMD12,  Sysclock 350 MHz
     SD clock-divider set to sysclock/3 (116.6 MHz)
     CID decode:  ManID=9C   OEMID=SO  Name=USD00
      Ver=0.2   Serial=39A8FBFB   Date=2018-1
     cluster size = 8192 bytes
    
     Buffer = 2 kB,  Written 512 kB at 753 kB/s,  Verified,  Read 512 kB at 4558 kB/s
     Buffer = 2 kB,  Written 512 kB at 854 kB/s,  Verified,  Read 512 kB at 4558 kB/s
     Buffer = 2 kB,  Written 512 kB at 855 kB/s,  Verified,  Read 512 kB at 4558 kB/s
    
     Buffer = 4 kB,  Written 1024 kB at 1429 kB/s,  Verified,  Read 1024 kB at 8162 kB/s
     Buffer = 4 kB,  Written 1024 kB at 1678 kB/s,  Verified,  Read 1024 kB at 8162 kB/s
     Buffer = 4 kB,  Written 1024 kB at 1672 kB/s,  Verified,  Read 1024 kB at 8068 kB/s
    
     Buffer = 8 kB,  Written 2048 kB at 2949 kB/s,  Verified,  Read 2048 kB at 13420 kB/s
     Buffer = 8 kB,  Written 2048 kB at 2994 kB/s,  Verified,  Read 2048 kB at 13310 kB/s
     Buffer = 8 kB,  Written 2048 kB at 3331 kB/s,  Verified,  Read 2048 kB at 13423 kB/s
    
  • IIRC while the write is ongoing, the result isn't guaranteed to be flushed, so you might need to plumb through the flushing from the FS layer.

  • evanhevanh Posts: 16,407
    edited 2025-04-20 14:53

    Yup, my updated CTRL_SYNC ioctl() issues a CMD12 and then waits on card busy before returning. An fclose() on an open write generates this sync.

  • RaymanRayman Posts: 15,107

    @evanh That's pretty awesome speeds there!

  • evanhevanh Posts: 16,407

    Certainly is. I hadn't imagined such a big jump.

    But not yet confident. I've found a second SD card, of eight now, that's not entirely happy. This one works when I enable the block logging though.

    I used to have a bunch of full-sized SD cards too, but haven't found even one of those. I suspect I threw them all out a long time ago because they probably all got smashed. I remember sitting on some and cracking the thin PCB material.

  • @evanh said:
    Whoa! I found a bug (Every second join became disjointed) that was slowing it down still. And I've got writes working with lazy CMD12 too! Don't need no big buffers any longer. Fast recording here we come. :D

    Wow that's what I want to see! These sorts of speeds will let me get back to the HDMI capture stuff I started a while back. I'd sort of assumed we'd hit a fundamental limit somewhere but didn't know why.

    @evanh said:
    Certainly is. I hadn't imagined such a big jump.

    But not yet confident. I've found a second SD card, of eight now, that's not entirely happy. This one works when I enable the block logging though.

    I used to have a bunch of full-sized SD cards too, but haven't found even one of those. I suspect I threw them all out a long time ago because they probably all got smashed. I remember sitting on some and cracking the thin PCB material.

    Keep at it. You'll probably figure out what the real limitation is there eventually and what feature the card needs to be able to do what we want.

Sign In or Register to comment.