<?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: RT595 boot over SPI timing &amp;amp; stability in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1416246#M18421</link>
    <description>&lt;P&gt;Hello&lt;BR /&gt;Hope you are well, I will gladly answer your questions:&lt;/P&gt;
&lt;P&gt;1) Unfortunately, we don´t have the source code available.&lt;/P&gt;
&lt;P&gt;2)The timing required for SPI are the ones specified at chapter 1.7.5. I suggest you make sure that #CE remains unasserted during idle state.&lt;/P&gt;
&lt;P&gt;3)You can find more detailed information at the OTP fuse map attached in the Reference Manual. BOOT_CFG[0]:bit7==1 set the high speed boot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Omar_Anguiano_1-1645237502917.png" style="width: 539px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/171101i02640648CB76F08E/image-dimensions/539x93?v=v2" width="539" height="93" role="button" title="Omar_Anguiano_1-1645237502917.png" alt="Omar_Anguiano_1-1645237502917.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4) This could be caused by the baudrate. If you are in Normal boot you could try a different baudrate or set high-speed boot for higher baudrate in SPI.&lt;/P&gt;
&lt;P&gt;If you have more questions do not hesitate to ask me.&lt;BR /&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Feb 2022 02:25:17 GMT</pubDate>
    <dc:creator>Omar_Anguiano</dc:creator>
    <dc:date>2022-02-19T02:25:17Z</dc:date>
    <item>
      <title>RT595 boot over SPI timing &amp; stability</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1412718#M18307</link>
      <description>&lt;P&gt;I'm trying to improve our boot timing by moving from UART to SPI boot. It's going well, at least 5 times faster at 20MHz compared to UART at 1M, but I'm running into some stability issues.&lt;/P&gt;&lt;P&gt;Using either spidev or a custom spi-backed serial interface with blhost, I frequently see it fail during boot with the following symptoms:&lt;/P&gt;&lt;P&gt;- the bootloader sometimes returns 5A twice in a row, in response to write-memory (instead of 5A, A1) often with a 3rd byte of A3, which I believe is data phase abort.&lt;/P&gt;&lt;P&gt;- this sometimes seems to happen if the host device tries to read the response byte(s) too fast, though it's hard to be precise about why it happens&lt;/P&gt;&lt;P&gt;- more commonly it seems to happen if the host device holds chip select down for too long on a write-memory data transfer. it seems that if that happens, or for whatever reason it is too slow to read the response, then it will trigger an abort.&lt;/P&gt;&lt;P&gt;I don't think I can diagnose this further without source code or detailed specs for the bootloader. So I'll just ask some questions:&lt;/P&gt;&lt;P&gt;1) Is boot loader source available?&lt;/P&gt;&lt;P&gt;2) Are there any specs on the timing requirements, particularly around chip select, time b/w writing and reading, between subsequent reads, etc?&lt;/P&gt;&lt;P&gt;3) I've see this work at 50MHz, though I'm testing it at 20M. The reference manual claims the default is 2M in one place, then 24M in another, but it can be higher if the device is running in "high speed" boot mode. What is the definition of high speed boot mode - I can't find any information about it.&lt;/P&gt;&lt;P&gt;4) What are the reasons the bootloader can respond with A3 after write-memory?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried nIRQ mode btw, so far I'm only observing the interrupt line toggle to see the timing and aren't actually driving the host from it. My suspicion is that even if I did that, the timing would still be violated.&lt;/P&gt;&lt;P&gt;I should add that this works reliably when the system is fairly idle, but we can have some fairly chaotic system load and timing just after boot which can distort, stretch, and randomly delay the spi bus.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would very much appreciate any input or sources of more information on this subject,&lt;/P&gt;&lt;P&gt;~Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 01:04:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1412718#M18307</guid>
      <dc:creator>mwr</dc:creator>
      <dc:date>2022-02-13T01:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: RT595 boot over SPI timing &amp; stability</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1416246#M18421</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;Hope you are well, I will gladly answer your questions:&lt;/P&gt;
&lt;P&gt;1) Unfortunately, we don´t have the source code available.&lt;/P&gt;
&lt;P&gt;2)The timing required for SPI are the ones specified at chapter 1.7.5. I suggest you make sure that #CE remains unasserted during idle state.&lt;/P&gt;
&lt;P&gt;3)You can find more detailed information at the OTP fuse map attached in the Reference Manual. BOOT_CFG[0]:bit7==1 set the high speed boot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Omar_Anguiano_1-1645237502917.png" style="width: 539px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/171101i02640648CB76F08E/image-dimensions/539x93?v=v2" width="539" height="93" role="button" title="Omar_Anguiano_1-1645237502917.png" alt="Omar_Anguiano_1-1645237502917.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4) This could be caused by the baudrate. If you are in Normal boot you could try a different baudrate or set high-speed boot for higher baudrate in SPI.&lt;/P&gt;
&lt;P&gt;If you have more questions do not hesitate to ask me.&lt;BR /&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Feb 2022 02:25:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1416246#M18421</guid>
      <dc:creator>Omar_Anguiano</dc:creator>
      <dc:date>2022-02-19T02:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: RT595 boot over SPI timing &amp; stability</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1419355#M18495</link>
      <description>&lt;P&gt;Thanks Omar!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a bit more information on the failure mode in case you know why it happens/how to deal with it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When it works the sequence is:&lt;/P&gt;&lt;P&gt;-&amp;gt; write-memory&lt;/P&gt;&lt;P&gt;&amp;lt;- 5A&lt;/P&gt;&lt;P&gt;&amp;lt;- A1&lt;/P&gt;&lt;P&gt;-&amp;gt; write-memory&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when it fails we see this:&lt;/P&gt;&lt;P&gt;-&amp;gt; write-memory&lt;/P&gt;&lt;P&gt;&amp;lt;- 5A&lt;/P&gt;&lt;P&gt;&amp;lt;- 5A&lt;/P&gt;&lt;P&gt;&amp;lt;- A1&lt;/P&gt;&lt;P&gt;&amp;lt;- FF&lt;/P&gt;&lt;P&gt;&amp;lt;- FF&amp;nbsp; &amp;nbsp;forever. It keeps trying to read one byte and never gets a response, which I think SPI sees as FF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The timing looks the same b/w success and failure cases. We are using an old version of blhost (2.6.2), so we'll update that. Do you know if returning 5A multiple times is a fatal error or perhaps blhost should accept it?&lt;/P&gt;&lt;P&gt;I've attached a diagram to show the sequence. The clock here is 16.7MHz&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 21:29:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1419355#M18495</guid>
      <dc:creator>mwr</dc:creator>
      <dc:date>2022-02-24T21:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: RT595 boot over SPI timing &amp; stability</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1419370#M18497</link>
      <description>&lt;P&gt;There's another failure mode too, where it returns A3 (data phase abort). I think this happens if the timing from the host is abnormally slow, but we want that to work, because the system is heavily loaded and some slowness should be tolerated if possible. Perhaps the timing is unnecessarily strict. Boot over UART seems much more tolerant, and works even with extremely staggered clock, etc.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 22:19:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1419370#M18497</guid>
      <dc:creator>mwr</dc:creator>
      <dc:date>2022-02-24T22:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: RT595 boot over SPI timing &amp; stability</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1424858#M18689</link>
      <description>&lt;P&gt;Hi Mark,&lt;/P&gt;
&lt;P&gt;As Omar replied, we don't have blhost codes to use GPIO for SPI timing. Instead, we can provide tech support to give you an idea where you can put GPIO in the source codes for testing.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested SPI interface with blhost 2.6.7. (attached here). It is original blhost codes. I ported it onto RT600 for testing SPI communication with GPIO. All those changes are meaningless to you. The changes that I made necessary for GPIO check is Serialpacketizer.cpp. Please refer to the codes and positions of WAIT_GPIO(x). You may also find some other changes in the file compared to the original. But you can ignore them because I made other changes for RT600 test only. Hope that it will be very clear to you. If you have any questions, please let us know.&lt;/P&gt;
&lt;P&gt;The g_setProperty_Flag is used for the first set_property command. Set_property command will be initial command to notify the ROM of GPIO port and pin name to be used for timing. Once this command packet is sent to RT500, RT500 initializes GPIO for purpose which will drive to high. If 5a and a1 are ready, it will drive back to low for indication to the host. The host needs to check that low and then read out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-&amp;nbsp; original blhost 2.6.7.zip.&lt;/P&gt;
&lt;P&gt;- SerialPacketizer.zip which contain GPIO check.&lt;/P&gt;
&lt;P&gt;- MIMXRT685S_Project.zip which is main file for testing. It shows&amp;nbsp;g_setProperty_Flag. The purpose is to set it when set property command is issued.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Frank&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 01:15:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT595-boot-over-SPI-timing-amp-stability/m-p/1424858#M18689</guid>
      <dc:creator>Frank_Kim</dc:creator>
      <dc:date>2022-03-09T01:15:17Z</dc:date>
    </item>
  </channel>
</rss>

