<?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>MCUXpresso SDKのトピックRe: Using SDcard hangs waiting for OSAevent</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1633435#M4292</link>
    <description>&lt;P&gt;Hello&lt;BR /&gt;I hope you are well.&lt;/P&gt;
&lt;P&gt;It will be helpful to check the device you are trying to connect. Yes, it is waiting for a command to complete, timeout can be configured to avoid the hang on that part.&lt;BR /&gt;Which type of card are you trying to interface?&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;</description>
    <pubDate>Thu, 13 Apr 2023 22:54:36 GMT</pubDate>
    <dc:creator>Omar_Anguiano</dc:creator>
    <dc:date>2023-04-13T22:54:36Z</dc:date>
    <item>
      <title>Using SDcard hangs waiting for OSAevent</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1627149#M4273</link>
      <description>&lt;P&gt;I'm using MCUXpresso version v11.7.0 with SDK version 2.13.0&lt;/P&gt;&lt;P&gt;I'm attempting to use the SDcard peripheral.&amp;nbsp; &amp;nbsp; I compiled/executed the SDK SDcard demo/example and it operates properly.&lt;/P&gt;&lt;P&gt;Now I'm trying to add this functionality to my application.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the MCUXpresso config tool to add the appropriate driver, then modified it to add the functions that were in the demo/example but not in the code that was added by the MCUXpresso.&lt;/P&gt;&lt;P&gt;I made sure that the pinMux and pinConfig calls matched those in the demo.&amp;nbsp; &amp;nbsp;I believe the clocks are set the same.&lt;/P&gt;&lt;P&gt;When I attempt to run the code, it hangs waiting for an OSA event (a mutex being cleared?)&lt;/P&gt;&lt;P&gt;Is it waiting for an SDcard command to complete?&amp;nbsp; &amp;nbsp; &amp;nbsp;Is there something else I need to set up or initialize?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 23:03:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1627149#M4273</guid>
      <dc:creator>CktDesigner</dc:creator>
      <dc:date>2023-04-03T23:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using SDcard hangs waiting for OSAevent</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1633435#M4292</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;I hope you are well.&lt;/P&gt;
&lt;P&gt;It will be helpful to check the device you are trying to connect. Yes, it is waiting for a command to complete, timeout can be configured to avoid the hang on that part.&lt;BR /&gt;Which type of card are you trying to interface?&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 22:54:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1633435#M4292</guid>
      <dc:creator>Omar_Anguiano</dc:creator>
      <dc:date>2023-04-13T22:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using SDcard hangs waiting for OSAevent</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1898349#M4835</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="akhil___0-1720002965244.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/286900i1828B6D5E0F5C119/image-size/medium?v=v2&amp;amp;px=400" role="button" title="akhil___0-1720002965244.png" alt="akhil___0-1720002965244.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/169053"&gt;@Omar_Anguiano&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/212894"&gt;@CktDesigner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/60336"&gt;@kerryzhou&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also facing the same issue. (RT 1170 custom board)&lt;/P&gt;&lt;P&gt;SDK version: 2.14&lt;/P&gt;&lt;P&gt;How can I resolve this?&lt;/P&gt;&lt;P&gt;"Timeout can be configured to avoid the hang on that part."&lt;BR /&gt;How do I configure the timeout?&lt;/P&gt;&lt;P&gt;Which type of card are you trying to interface?&lt;BR /&gt;SDHC (32 GB)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Similar issue -&lt;LI-MESSAGE title="Infinite wait when initialising SD card with FatFS and FreeRTOS on RT1176" uid="1553660" url="https://community.nxp.com/t5/i-MX-RT/Infinite-wait-when-initialising-SD-card-with-FatFS-and-FreeRTOS/m-p/1553660#U1553660" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Does the SDK unmodified example work correctly? It can be helpful to restart the host before initializing the Sdcard."&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Same issue for example projects "evkmimxrt1170_sdcard_fatfs_cm7" and&amp;nbsp;"evkmimxrt1170_sdcard_fatfs_freertos_cm7"&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AKHIL&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 11:54:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1898349#M4835</guid>
      <dc:creator>akhil__</dc:creator>
      <dc:date>2024-07-03T11:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using SDcard hangs waiting for OSAevent</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1898535#M4836</link>
      <description>&lt;P&gt;I am using RT1062 on a custom board.&amp;nbsp; &amp;nbsp; I couldn't find any detailed documentation that describes the SD card interface, so I had to walk through the code to determine what features, etc. needed to be enabled.&lt;/P&gt;&lt;P&gt;To allow the SD card to be mounted, there are a number of conditions that need to be met.&amp;nbsp; &amp;nbsp;Some of them are:&lt;/P&gt;&lt;P&gt;1. SD card must be powered.&amp;nbsp; &amp;nbsp;On the NXP evaluation board, there is a control bit that turns power on.&lt;/P&gt;&lt;P&gt;2. The SD card voltage must be correct.&amp;nbsp; &amp;nbsp;On the NXP evaluation board, there is a control bit that selects one of two voltages.&amp;nbsp; &amp;nbsp;In my design, it is always 3.3V&lt;/P&gt;&lt;P&gt;3. The SD card detect must be active.&amp;nbsp; &amp;nbsp;Most card sockets have a switch that detects if the card is present.&amp;nbsp; &amp;nbsp;This must be wired to the correct pin.&lt;/P&gt;&lt;P&gt;In my case, the code "hung" in an infinite loop waiting for all of the conditions to be met, then eventually timed out.&amp;nbsp; &amp;nbsp;Putting breakpoints in was somewhat tricky because the timer would sometimes time out,&amp;nbsp; so debugging was a long process!&lt;/P&gt;&lt;P&gt;Perhaps the place to start is to look through "sdmcc_config.h" and "sdmcc_config.c" to make sure you have set everything up correctly for your custom board.&amp;nbsp; &amp;nbsp; For example, in the header file, I had to comment out:&lt;/P&gt;&lt;P&gt;#define BOARD_SDMMC_SD_IO_VOLTAGE_CONTROL_TYPE kSD_IOVoltageCtrlByHost&lt;/P&gt;&lt;P&gt;and replace it with&lt;/P&gt;&lt;P&gt;#define BOARD_SDMMC_SD_IO_VOLTAGE_CONTROL_TYPE kSD_IOVoltageCtrlNotSupport&lt;/P&gt;&lt;P&gt;The .c file does some pin assignments, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 16:46:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1898535#M4836</guid>
      <dc:creator>CktDesigner</dc:creator>
      <dc:date>2024-07-03T16:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using SDcard hangs waiting for OSAevent</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1899281#M4837</link>
      <description>&lt;P&gt;Thanks for the reply&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am using an RT1170 custom board.&lt;BR /&gt;&lt;BR /&gt;1) In my case there is no card detect pin&lt;BR /&gt;2) The voltage is always 3.3v&lt;BR /&gt;&lt;BR /&gt;I tried using the example code(&lt;SPAN&gt;evkmimxrt1170_sdcard_fatfs_cm7&lt;/SPAN&gt;), but it gets stuck in SDMMC_OSAEventwait()&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Tried this also&lt;/P&gt;&lt;P&gt;#define BOARD_SDMMC_SD_IO_VOLTAGE_CONTROL_TYPE kSD_IOVoltageCtrlByHost&lt;/P&gt;&lt;P&gt;replaced with&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define BOARD_SDMMC_SD_IO_VOLTAGE_CONTROL_TYPE kSD_IOVoltageCtrlNotSupport&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 07:41:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1899281#M4837</guid>
      <dc:creator>akhil__</dc:creator>
      <dc:date>2024-07-04T07:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using SDcard hangs waiting for OSAevent</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1899605#M4838</link>
      <description>&lt;P&gt;As I mentioned, you must check all of the conditions needed by the SDcard software.&lt;/P&gt;&lt;P&gt;From the stack trace you included, while the code waits in SDMMC_OSAEventWait, it is waiting due to the transfer that was initiated from SDMMCHOST_TransferFunction, which was called from SD_SendInterfaceCondition, which was called from SD_ProbeBusVoltage....&lt;/P&gt;&lt;P&gt;SD_ProbeBusVoltage is called from sdcard_init...&amp;nbsp; &amp;nbsp; &amp;nbsp;If&amp;nbsp;BOARD_SDMMC_SD_IO_VOLTAGE_CONTROL_TYPE is set to kSD_IOVoltageCtrlNotSupport , this code sho&lt;SPAN&gt;uld be skipped over.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Even though your card socket doesn't have a card detect pin, the code checks for the status of the pin assigned in sdmmc_config.h&amp;nbsp; &amp;nbsp; &amp;nbsp; Make sure you have set these up appropriately...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 13:53:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1899605#M4838</guid>
      <dc:creator>CktDesigner</dc:creator>
      <dc:date>2024-07-04T13:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using SDcard hangs waiting for OSAevent</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1899631#M4839</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;The issue was resolved by switching from a Class 4 to a Class 6 SD card.&lt;/P&gt;&lt;P&gt;Now, I'm facing an issue while creating a new project. The SDK example works fine, and modified SDK examples also work fine. However, in the new project, when I call the function f_mkdir it gets stuck in a loop, as shown in the attached image.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="akhil___0-1720104067779.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/287149iFB8551A6D1A00D39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="akhil___0-1720104067779.png" alt="akhil___0-1720104067779.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After this,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="akhil___1-1720104158527.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/287151iC979B7D17254362E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="akhil___1-1720104158527.png" alt="akhil___1-1720104158527.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Am I missing any settings? How can I resolve this?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/212894"&gt;@CktDesigner&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/169053"&gt;@Omar_Anguiano&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/60336"&gt;@kerryzhou&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Akhil&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 14:43:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Using-SDcard-hangs-waiting-for-OSAevent/m-p/1899631#M4839</guid>
      <dc:creator>akhil__</dc:creator>
      <dc:date>2024-07-04T14:43:57Z</dc:date>
    </item>
  </channel>
</rss>

