sdhc: spi: wait for VDD stable before clocking
The SD physical layer specification requires that the operating supply be stable for at least 1 millisecond before providing the required 74 clocks. The maximum VDD ramp time is specified at 35ms, giving a total minimum delay of 36ms. Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
parent
a16bfb39ff
commit
a1ad0ad6c6
1 changed files with 6 additions and 0 deletions
|
|
@ -727,6 +727,12 @@ static int sdhc_spi_set_io(const struct device *dev, struct sdhc_io *ios)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
/* Wait until VDD is stable. Per the spec:
|
||||
* Maximum VDD rise time of 35ms.
|
||||
* Minimum 1ms VDD stable time.
|
||||
*/
|
||||
k_sleep(K_MSEC(36));
|
||||
|
||||
LOG_INF("Powered up");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue