Announcement

Collapse
No announcement yet.

media_WriteWord() Error at end of a Sector

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16


    There will be an overhead for the 2 extra function calls, but the SPI speed for 2 x byte reads is same as 1 x 16bit reads.

    To improve performance further, you can eliminate the function call and just use:-

    val16 := (media_ReadByte() | (media_ReadByte()
    Regards,
    Dave

    Comment


    • #17


      Thanks. I'll sure to test them out & time the whole process.

      Comment


      • #18


        I just noticed that code I pasted is oncorrect,

        medi_ReadWord etc use big endian values, so you actually require:-

        val16 := (media_ReadByte()
        Regards,
        Dave

        Comment

        Working...
        X