<?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>MQX Software Solutions中的主题 Re: Can't read directory from a separate task</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-read-directory-from-a-separate-task/m-p/162995#M1377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the data are in a struct like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--- code start ---&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;typedef struct&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unit8&amp;nbsp;&amp;nbsp; test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB_FILESYSTEM_STRUCT_PTR&amp;nbsp;&amp;nbsp;&amp;nbsp; USB_fs_ptr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}USB_ST;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;USB_ST&amp;nbsp;&amp;nbsp;&amp;nbsp; Usb_st;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;--- code end ---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The struct beginns at a adress, that is devidable through 4 (32 bit). When I'm trying to&amp;nbsp;get "inner"&amp;nbsp;adress&amp;nbsp;from the USB_FILESYSTEM_STRUCT_PTR, the pointer to the adress begins at address that is devideable through 4 +1, becaus of the variable test.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;values:&amp;nbsp;&lt;/P&gt;&lt;P&gt;test = 0xFF&lt;/P&gt;&lt;P&gt;Usb_st.USB_fs_ptr-&amp;gt;FS_FD_PTR = 0x20001000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to give Usb_st.USB_fs_ptr-&amp;gt;FS_FD_PTR to the ioctl function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ioctl(Usb_st.USB_fs_ptr-&amp;gt;FS_FD_PTR, ..., ...) the function receive the adress 0xFF200010.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cu,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Dec 2009 00:29:34 GMT</pubDate>
    <dc:creator>Stefan_75</dc:creator>
    <dc:date>2009-12-22T00:29:34Z</dc:date>
    <item>
      <title>Can't read directory from a separate task</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-read-directory-from-a-separate-task/m-p/162994#M1376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the ftp-usb example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to read the directory from the USB stick. Doing this with the code below, there's no problem. I'm using the code directly after installing the MFS in the USB_task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, when I'm trying to read the directory&amp;nbsp;periodically (e.g every minute) from a separate task i get a MQX_UNHANDLED_INTERRUPT at the ioctl command. All data needed to access the MFS at the USB stick are in a global struct (USB_st).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--- code start ----&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sprintf (USB_st.filepath, "*.*");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;USB_st.search.ATTRIBUTE = MFS_ATTR_READ_ONLY | MFS_ATTR_HIDDEN_FILE | MFS_ATTR_SYSTEM_FILE | MFS_ATTR_ARCHIVE;&lt;BR /&gt;USB_st.search.WILDCARD = USB_st.filepath;&lt;BR /&gt;USB_st.search.SEARCH_DATA_PTR = &amp;amp;USB_st.search_data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;USB_st.error_code_UL = ioctl(((USB_FILESYSTEM_STRUCT_PTR)(USB_st.usb_fs_handle-&amp;gt;FS_FD_PTR)), IO_IOCTL_FIND_FIRST_FILE,(uint_32_ptr) &amp;amp;(USB_st.search));&lt;BR /&gt;while (USB_st.error_code_UL == MFS_NO_ERROR)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;USB_st.error_code_UL = _io_ioctl(USB_st.usb_fs_handle-&amp;gt;FS_FD_PTR, IO_IOCTL_FIND_NEXT_FILE, (uint_32_ptr) &amp;amp;USB_st.search_data);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--- code end ----&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anybody any idea? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stefan&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2009 21:48:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-read-directory-from-a-separate-task/m-p/162994#M1376</guid>
      <dc:creator>Stefan_75</dc:creator>
      <dc:date>2009-12-21T21:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read directory from a separate task</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-read-directory-from-a-separate-task/m-p/162995#M1377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the data are in a struct like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--- code start ---&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;typedef struct&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unit8&amp;nbsp;&amp;nbsp; test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB_FILESYSTEM_STRUCT_PTR&amp;nbsp;&amp;nbsp;&amp;nbsp; USB_fs_ptr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}USB_ST;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;USB_ST&amp;nbsp;&amp;nbsp;&amp;nbsp; Usb_st;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;--- code end ---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The struct beginns at a adress, that is devidable through 4 (32 bit). When I'm trying to&amp;nbsp;get "inner"&amp;nbsp;adress&amp;nbsp;from the USB_FILESYSTEM_STRUCT_PTR, the pointer to the adress begins at address that is devideable through 4 +1, becaus of the variable test.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;values:&amp;nbsp;&lt;/P&gt;&lt;P&gt;test = 0xFF&lt;/P&gt;&lt;P&gt;Usb_st.USB_fs_ptr-&amp;gt;FS_FD_PTR = 0x20001000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to give Usb_st.USB_fs_ptr-&amp;gt;FS_FD_PTR to the ioctl function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ioctl(Usb_st.USB_fs_ptr-&amp;gt;FS_FD_PTR, ..., ...) the function receive the adress 0xFF200010.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cu,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 00:29:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-t-read-directory-from-a-separate-task/m-p/162995#M1377</guid>
      <dc:creator>Stefan_75</dc:creator>
      <dc:date>2009-12-22T00:29:34Z</dc:date>
    </item>
  </channel>
</rss>

