sdtimer was used to evaluate performance but is no longer used.
/* command utils */
-static void sdtimer_init(void)
-{
- sdtimer_en_write(0);
- sdtimer_load_write(0xffffffff);
- sdtimer_reload_write(0xffffffff);
- sdtimer_en_write(1);
-}
-
-static unsigned int sdtimer_get(void)
-{
- sdtimer_update_value_write(1);
- return sdtimer_value_read();
-}
-
-
int sdcard_wait_cmd_done(void) {
unsigned check_counter = 0;
unsigned int cmdevt;
sdcore_cmdtimeout_write(1<<19);
sdcore_datatimeout_write(1<<19);
- sdtimer_init();
-
/* reset card */
sdcard_go_idle();
busy_wait(1);