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,402
    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,402
    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,104

    @evanh That's pretty awesome speeds there!

Sign In or Register to comment.