No announcement yet.

Write Sector Block Data - How To Count Address

  • Filter
  • Time
  • Show
Clear All
new posts

  • Write Sector Block Data - How To Count Address

    Currently I´m trying to get the write sector block data command to work. The problem is, that not every sector will be written to, altough I receive an ACK. Has anybody similar experiences?
    I increment the sector address by one, is that right?

  • #2


    There were issues with bytewise writes (fixed with PmmC Rev2 release) but no issues relating to sector writes. Can you provide a brief description of your setup? e.g. Voltage supply, host controller, etc etc


    • #3

      Hi Atilla,

      I´m unsing an FPGA. I wrote the UART Driver myself. Other external hardware which uses the same UART driver works properly. I´ve tried 3.3V and 5V vcc with no difference. I noticed that blockwise write works if I insert some wait cycles between two consecutive writes, however bandwith is almost the half after that. I need to store Data from an inertial measurement unit at 100Hz and GPS Data at 1Hz, so I have to use a Baudrate of 256000 bit/s to have enough bandwidth.

      Here´s a code snipped. The language is called handel-c but it is very similar to ansi-c

      /*write sector block data to SD Card*/
      UART_Tx[1](TxBit, 0x40, 1);
      UART_Tx[1](TxBit, 0x57, 1);

      /*Sector Address*/
      UART_Tx[1](TxBit, sectorAddress[23:16], 1);
      UART_Tx[1](TxBit, sectorAddress[15:8], 1);
      UART_Tx[1](TxBit, sectorAddress[7:0], 1);

      for(i=0; i != BLOCKSIZE; i++){

      UART_Tx[1](TxBit, SBD[i


      • #4
        I increment the sector address by one, is that right?

        Join online and testking to pass a+ study guide exam in first try. Our best quality security+ practice test and Northwestern University guide you well for real exam.
        Last edited by carryonjutta; 23 January 2015, 03:11 PM.