<?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>RTX lockup</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/39084/rtx-lockup</link><description> 
Hello, 

 
I&amp;#39;d like to report a problem with RTX that has been present in the
kernel for a long time - see here: 

 
 http://www.keil.com/forum/15211/ 

 
I am facing the exact same problem, but the exact series of event
required to induce this seems</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: RTX lockup</title><link>https://community.arm.com/thread/90771?ContentTypeID=1</link><pubDate>Wed, 22 Dec 2010 00:48:55 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:319c9a0c-79d2-4111-80c2-f4a4edcb5b53</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
But this seems to cause the controller to enter &amp;quot;undefined&amp;quot; mode
from time to time (hanging at &amp;quot;SWI dead&amp;quot;)...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTX lockup</title><link>https://community.arm.com/thread/58993?ContentTypeID=1</link><pubDate>Wed, 22 Dec 2010 00:43:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b5c9ec64-b975-4cba-8b66-b6e44ec988d1</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
I have a possible work-around, but I vehemently believe this is
indeed a timing problem in the kernel:&lt;/p&gt;

&lt;pre&gt;
while (l_file_size)
{
        l_data_offset += l_bytes_read ; // the offset of the next data to acquire

        // this call returns once the requested page has been fully received
        if ( spi_request_app_data(a_command,
                                                          l_data_offset,
                                                          SPI_FRAME_TIMEOUT) != NO_ERROR)
        {
                g_update_rtc = 0x62 ;

                l_result = ERR_SPI_BAD_STATUS ;

                break ;
        }

        g_update_rtc = 0x62 ;

        // data is appended to the file &amp;quot;R:protocol_data.map&amp;quot;

        lp_spi_data = get_spi_rx_buffer(&amp;amp;l_bytes_read) ;

        l_bytes_read -= 4 ; // file size bytes are not real data, just an indication. ignore.

        // write data to RAM drive
        safe_fwrite(lp_spi_data + 4, // skip file size
                                1,
                                l_bytes_read,
                                lp_handle) ;

        if (safe_ferror(lp_handle) )
        {
                g_update_rtc = 0x62 ;

                l_result = ERR_FILE_WRITE_FAILED ;

                break ;
        }

        l_file_size -= l_bytes_read ; // reamining bytes to read

        &lt;b&gt;os_dly_wait(25) ; // 250[ms] delay&lt;/b&gt;
}
&lt;/pre&gt;

&lt;p&gt;
I have noticed that once I ask only one block via the SPI bus from
the outside world the data pattern on my scope is nice and contains a
time delta of 250[ms], and I never experience lookups. So I&amp;#39;ve added
the same delay when addressing the SPI bus to read an entire file
(not per block), and it seems to work so far.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>