From 5158af0da64d37c3c14b79faec2fc37110bba013 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Wed, 8 Mar 2017 11:46:00 -1000 Subject: [PATCH] Ensure interrups are back in BEFORE running code dependant on clock_systimer --- arch/arm/src/kinetis/kinetis_sdhc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/kinetis/kinetis_sdhc.c b/arch/arm/src/kinetis/kinetis_sdhc.c index a1d1e847c5..e3a36762e0 100644 --- a/arch/arm/src/kinetis/kinetis_sdhc.c +++ b/arch/arm/src/kinetis/kinetis_sdhc.c @@ -2916,6 +2916,8 @@ void sdhc_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot) priv->cdstatus &= ~SDIO_STATUS_PRESENT; } + leave_critical_section(flags); + mcinfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); /* Perform any requested callback if the status has changed */ @@ -2924,8 +2926,6 @@ void sdhc_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot) { kinetis_callback(priv); } - - leave_critical_section(flags); } /****************************************************************************