<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>MMC read write in RTX</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/24473/mmc-read-write-in-rtx</link><description> 
Hi, 
I am using RTX kernel to read write to MMC the program works fine
with normal operation ,but when I use the same code with RTX kernel
it does not creat any file infact no information from the MMC is get
like File system etc ,is there any new method</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: MMC read write in RTX</title><link>https://community.arm.com/thread/76963?ContentTypeID=1</link><pubDate>Thu, 11 Dec 2008 23:37:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cedb5da9-2cdc-4d05-bff9-8f3368b95479</guid><dc:creator>rupesh vishwakarma</dc:creator><description>&lt;p&gt;&lt;p&gt;
I think you are write&lt;/p&gt;

&lt;p&gt;
my kernel is microlib version so how can I proceed to read write
to a MMC card my code using normal file I/O routenes is there any way
to read write to MMC with RTX&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MMC read write in RTX</title><link>https://community.arm.com/thread/101429?ContentTypeID=1</link><pubDate>Thu, 11 Dec 2008 02:40:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:be90ce19-f484-4da9-9692-2ab456b566cd</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Is not any of the functions returning any results back to help you
figuring out the problem?&lt;/p&gt;

&lt;p&gt;
Not even test code should ignore looking at result
codes/sizes.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MMC read write in RTX</title><link>https://community.arm.com/thread/76964?ContentTypeID=1</link><pubDate>Thu, 11 Dec 2008 02:29:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7e5e96fb-8a2b-4be8-a170-83d9ad26c2c7</guid><dc:creator>rupesh vishwakarma</dc:creator><description>&lt;p&gt;&lt;p&gt;
presently I am using a single task in which no other task is
called even then MMC is not responding I call every function in
main&lt;/p&gt;

&lt;pre&gt;



#include &amp;lt;RTL.h&amp;gt;
#include &amp;lt;91x_lib.H&amp;gt;
#include &amp;quot;LCD.h&amp;quot;
#include &amp;quot;RT_Agent.h&amp;quot;                   /* Real-Time Agent definitions       */
#include &amp;lt;stdio.h&amp;gt;
#include &amp;quot;mmc.h&amp;quot;
#include &amp;quot;fat.h&amp;quot;
/* id1, id2, id3, id4 will contain task identifications at run-time */
OS_TID id1, id2, id3, id4,id5;
OS_MUT mutex1;


 /*----------------------------------------------------------------------------
 *        Main: Initialize and start RTX Kernel
 *---------------------------------------------------------------------------*/
int main (void) {
  //os_sys_init (task1);
     unsigned char SPI_Buffer[512];
        unsigned char data[50]=&amp;quot;hello world941\n&amp;quot;;
        unsigned int x = 0, y = 0;
        char fname[20];
        unsigned char MMCPRESENCE = 0;
        unsigned char z = FALSE;
//      char *header = (char *)malloc(14);
//      char *infoheader = (char *)malloc(40);


        File_Handler *file_handle;
        file_handle = (File_Handler*)calloc(1,sizeof(File_Handler));
        SCU_Configuration();
        UART_0_GPIO_5_INIT();
        UART0_INIT();
         printf(&amp;quot;hi&amp;quot;);
//      UART_0_GPIO_5_INIT();
//      UART0_INIT();
        //SCU_Configuration();                  //Enabling peripheral clock for SSP0 and GPIO2(SSP0 in port 2)
        os_mut_init (mutex1);
        GPIO_Configuration();           // configuring SSP0 pins in port2
        init_SSP0();
//      createheader(header,116,104);
///     createinfoheader(infoheader,116,104);
        MMCPRESENCE = init_MMC();
        printf(&amp;quot;MMCPRESENCE %x \n\r&amp;quot;,MMCPRESENCE);
//      printf(&amp;quot;Logging data to MMC\n\r&amp;quot;);
        Read_Disk_Info(SPI_Buffer,file_handle);
        Display_Disk_Info(file_handle);
        Display_Disk_Info(file_handle);
        printf(&amp;quot;opening file\n\r&amp;quot;);
        sprintf(fname,&amp;quot;DATA.TXT&amp;quot;);
        z=File_Open(fname,SPI_Buffer,file_handle);
        printf(&amp;quot;z: %x  \n\r&amp;quot;,z);
        //while(1)
        //{
                if(z==TRUE)
                {
                        printf(&amp;quot;writing \n\r&amp;quot;);
                        Write_File(file_handle,data,strlen(data),SPI_Buffer);
                        printf(&amp;quot;written\n\r&amp;quot;);
                }
        //}
        File_close(file_handle);
        printf(&amp;quot;file closed \n\r&amp;quot;);
        os_mut_release (mutex1);

}

/*----------------------------------------------------------------------------
 * end of file
 *---------------------------------------------------------------------------*/
&lt;/pre&gt;

&lt;p&gt;
even then its not working&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MMC read write in RTX</title><link>https://community.arm.com/thread/53045?ContentTypeID=1</link><pubDate>Wed, 10 Dec 2008 23:15:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0d2c4904-d6fb-4648-bb5a-6a8422638869</guid><dc:creator>Franc  Urbanc</dc:creator><description>&lt;p&gt;&lt;p&gt;
There should be no difference when using RTX or not using RTX. In
your case, you have most likely a wrong system configuration for RTX
version. Check the stack and the heap sizes. You also need to protect
your MMC low layer with mutexes. Interrupting one MMC transaction and
starting a new from another task will cause a MMC not
functioning.&lt;/p&gt;

&lt;p&gt;
Of course if you have &lt;i&gt;Use microlib&lt;/i&gt; enabled in your RTX
version, will also not work. The &lt;i&gt;Microlib&lt;/i&gt; does not support any
file IO except STDIN, STOUT and STDERR.&lt;/p&gt;

&lt;p&gt;
Franc&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>