I have written SDHC code,for writing block of data.Problem is block,italic part took long time i.e around 2ms.Return byte took long time to get to zero so that condition exits, My other code has 1ms interrupt in which it has to do other task, those tasks cannot be written in interrupt. Can someone suggest me some way how to deal with this. So that when control reaches here,I can jump to take my reading of 1ms & return here after 2 ms to try again.

Or I am doing some mistake here in code & it should not take 2ms .

Rest my code is working fine, writing & reading SD card are OK.

Code ( (Unknown Language)):

response = SD_Command(CMD24_WRITE_SINGLE_BLOCK , startBlock,0x00); // if reponse not zero then there is error // try calling sdhc_write_block again

SD cards sometimes do take a long time to complete a write; as long as 35 milliseconds in some cases.

I once ran a test of timing writes as my microcontroller program wrote several thousand sequential sectors to an SD card. Most writes took only about 600 microseconds (if I remember correctly) but approximately (but not strictly) every 512 sectors, the write would have the very long delay of many milliseconds.

I assume that the card internal firmware occasionally needs the extra time to pre-erase large blocks of sectors, but that's just a guess.

If the SDHC card is behaving differently than standard SD cards, all I can suggest is to read the manufacturer's documentation to see if they warn of any possible performance issues. Or try another card.