Anyone who has interfaced SDHC.
How much time it will take to send a frame of 512 bytes with 18Mhz speed over SPI protocol.
Theoretically it will be 18Mbits/sec i.e 227us for 512 bytesr.
But my code is taking 750us. Am I mistaking somewhere:
uint32_t i;
for(i = 0; i< 512 ; i++)
{
send_byte(my_array[i]);
}
inline uint8_t send_byte( uint8_t temp )
{
while (tx_buffer_not_empty or busy);
DATA_REG = temp;
while(rx_buffer_empty or busy);
returrn (DATA_REG);
}