<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FRDM-K66F microSD Detect pin doesn't trigger interrupt on card insert or removal in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1899893#M66516</link>
    <description>&lt;P&gt;Yeah, in the SDK example source, in&amp;nbsp;&lt;SPAN&gt;&lt;FONT color="#FF9900"&gt;BOARD_InitPins&lt;/FONT&gt; (pin_mux.c), pin PTD10 is configured with &lt;FONT color="#FF9900"&gt;kPORT_PullUp&lt;/FONT&gt; - this is provided by NXP; I didn't change this - and as such, the interrupt is never triggered. &amp;nbsp;The example program does not properly detect whether the card is inserted or not. &amp;nbsp;My own example program now works properly. &amp;nbsp;The example code should be updated to use&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF9900"&gt;kPORT_PullDown&lt;/FONT&gt;, instead.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2024 03:32:20 GMT</pubDate>
    <dc:creator>aaronm</dc:creator>
    <dc:date>2024-07-05T03:32:20Z</dc:date>
    <item>
      <title>FRDM-K66F microSD Detect pin doesn't trigger interrupt on card insert or removal</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1897822#M66495</link>
      <description>&lt;P&gt;Board: FRDM-K66F. &amp;nbsp;SDK: 2.11.0 (541 2022-01-14)&lt;/P&gt;&lt;P&gt;SDK components selected:&lt;/P&gt;&lt;P&gt;project_template.frdmk66f.MK66F18&lt;BR /&gt;device.MK66F18_startup.MK66F18&lt;BR /&gt;platform.drivers.clock.MK66F18&lt;BR /&gt;component.uart_adapter.MK66F18&lt;BR /&gt;device.MK66F18_system.MK66F18&lt;BR /&gt;platform.drivers.rtc.MK66F18&lt;BR /&gt;platform.drivers.port.MK66F18&lt;BR /&gt;platform.drivers.smc.MK66F18&lt;BR /&gt;CMSIS_Include_core_cm.MK66F18&lt;BR /&gt;component.serial_manager_uart.MK66F18&lt;BR /&gt;component.lists.MK66F18&lt;BR /&gt;utility.debug_console.MK66F18&lt;BR /&gt;platform.drivers.gpio.MK66F18&lt;BR /&gt;device.MK66F18_CMSIS.MK66F18&lt;BR /&gt;platform.drivers.uart.MK66F18&lt;BR /&gt;platform.drivers.i2c.MK66F18&lt;BR /&gt;component.serial_manager.MK66F18&lt;BR /&gt;platform.drivers.common.MK66F18&lt;BR /&gt;middleware.fatfs.sd.MK66F18&lt;BR /&gt;middleware.sdmmc.osa.bm.MK66F18&lt;BR /&gt;middleware.sdmmc.common.MK66F18&lt;BR /&gt;middleware.sdmmc.host.sdhc.MK66F18&lt;BR /&gt;middleware.sdmmc.sd.MK66F18&lt;BR /&gt;middleware.sdmmc.sdhc.template.MK66F18&lt;BR /&gt;middleware.sdmmc.host.sdhc.interrupt.MK66F18&lt;BR /&gt;platform.drivers.sdhc.MK66F18&lt;BR /&gt;component.osa_bm.MK66F18&lt;BR /&gt;middleware.fatfs.MK66F18&lt;BR /&gt;platform.drivers.flash.MK66F18&lt;BR /&gt;middleware.fatfs.template_sd.MK66F18&lt;BR /&gt;platform.drivers.pit.MK66F18&lt;/P&gt;&lt;P&gt;I have the pins selected as indicated in the attached image. &amp;nbsp;GPIO pin PTD10 is used as "card detect," and I have a port interrupt handler, as well as a breakpoint on the interrupt handler, to trigger when the pin B3 / PTD10 pin goes up or down; in theory. &amp;nbsp;The SW2 and SW3 buttons are configured similarly with interrupts, and they trigger when pushed; they work as expected. &amp;nbsp;However, when I insert or remove the micro SD card, I don't get an interrupt on pin B3 / PTD10. &amp;nbsp;This could be handled by the SDK somewhere else, though&amp;nbsp;&lt;SPAN&gt;BOARD_SDMMC_SD_CD_PORT_IRQ_HANDLER is configured to point to my PORTD_IRQHandler.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Shouldn't I expect a hardware interrupt on pin B3 / PTD10 when a micro SD card is inserted or removed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-07-02 at 6.38.32 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/286727i87E869CD52B2E69E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-07-02 at 6.38.32 PM.png" alt="Screenshot 2024-07-02 at 6.38.32 PM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 22:47:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1897822#M66495</guid>
      <dc:creator>aaronm</dc:creator>
      <dc:date>2024-07-02T22:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K66F microSD Detect pin doesn't trigger interrupt on card insert or removal</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1899042#M66507</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suppose that microSD Detect pin does not use interrupt mode, while it uses polling mode from application requirement.&lt;/P&gt;
&lt;P&gt;For example, you want to establish a file and save data to the file. After the chip receive commands from host, it initializes the SD card, polls the INSERT pin logic, establish a file,...&lt;/P&gt;
&lt;P&gt;But this is not the application requirement, when you insert the SD&amp;nbsp; card, the chip enters an ISR and establish a file system do something...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 03:26:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1899042#M66507</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-07-04T03:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K66F microSD Detect pin doesn't trigger interrupt on card insert or removal</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1899157#M66510</link>
      <description>&lt;P&gt;Thank you, but it doesn't really help. &amp;nbsp;For testing, I created an example project from the SDK for "sdcard_fatfs," and tried to get it to run with and without the SD card inserted into the slot, but the test for the presence of an SD card - checking the bit value of PTD10 - returns "1" in all cases, whether the card is installed or not. &amp;nbsp;In fact, PTD10 reads "1" in all cases, once the program is started.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-07-04 at 1.16.54 AM.png" style="width: 844px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/287024i978BBCA5668A9468/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-07-04 at 1.16.54 AM.png" alt="Screenshot 2024-07-04 at 1.16.54 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I noticed the PORTD_IRQHandler is configured and enabled in the source code, but the handler is never called. &amp;nbsp;I've included the SDK example program I used for testing so you can check it for yourself. &amp;nbsp;Perhaps I'm overlooking something very simple.&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 05:58:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1899157#M66510</guid>
      <dc:creator>aaronm</dc:creator>
      <dc:date>2024-07-04T05:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K66F microSD Detect pin doesn't trigger interrupt on card insert or removal</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1899775#M66514</link>
      <description>&lt;P&gt;I haven't tested it extensively, and I have a holiday picnic to attend, but I changed the PTD10 "Pull select" to "Pulldown" and the "Pull enable" to "Enabled," and then ran a quick test: the interrupt *did* trigger when the card was inserted. &amp;nbsp;Again, I have to test this more fully, but it looks like an operator error (mine -- oops). &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 20:18:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1899775#M66514</guid>
      <dc:creator>aaronm</dc:creator>
      <dc:date>2024-07-04T20:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K66F microSD Detect pin doesn't trigger interrupt on card insert or removal</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1899893#M66516</link>
      <description>&lt;P&gt;Yeah, in the SDK example source, in&amp;nbsp;&lt;SPAN&gt;&lt;FONT color="#FF9900"&gt;BOARD_InitPins&lt;/FONT&gt; (pin_mux.c), pin PTD10 is configured with &lt;FONT color="#FF9900"&gt;kPORT_PullUp&lt;/FONT&gt; - this is provided by NXP; I didn't change this - and as such, the interrupt is never triggered. &amp;nbsp;The example program does not properly detect whether the card is inserted or not. &amp;nbsp;My own example program now works properly. &amp;nbsp;The example code should be updated to use&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF9900"&gt;kPORT_PullDown&lt;/FONT&gt;, instead.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 03:32:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K66F-microSD-Detect-pin-doesn-t-trigger-interrupt-on-card/m-p/1899893#M66516</guid>
      <dc:creator>aaronm</dc:creator>
      <dc:date>2024-07-05T03:32:20Z</dc:date>
    </item>
  </channel>
</rss>

