<?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 rt685 HiFi4, erratic DSP code bahaviour when loaded from MCU in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/rt685-HiFi4-erratic-DSP-code-bahaviour-when-loaded-from-MCU/m-p/2125655#M34595</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;I am working on a audio processing demo that runs on a R685-AUD-EVK. I have followed the getting started resources, the MCU and DSP FW is mostly based on "audio_demo_bm" from the SDK.&lt;BR /&gt;&lt;BR /&gt;MCU FW only does basic initialization of GPIOS for a simple user interface.&lt;BR /&gt;DSP FW intializes the I2S and DMA for audio input/output, data is buffered using the "triple buffer" approach as suggested in one of the NXP application notes.&lt;BR /&gt;The actual audio processing function is called from the I2S/DMA receive ISR once 1ms of audio data (i.e. 48 left and 48 right samples) has been received.&lt;BR /&gt;Processing of audio data uses the natureDSP library functions.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So far everything runs as expected when MCU FW and DSP FW are built and run in Debug mode, but I am observing issues when the DSP FW is loaded from the MCU (Release build, &lt;SPAN&gt;DSP_IMAGE_COPY_TO_RAM&lt;/SPAN&gt;&amp;nbsp;= 1).&lt;BR /&gt;&lt;BR /&gt;When the audio processing function (called from the ISR) is placed in ".iram0.text" (instruction TCM memory) the DSP FW runs into an exception.&lt;BR /&gt;xt-ocd prints:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error: Exception details: exccause:0x0, excvaddr:0xff0042, epc:0x240205bc, epcdbg:20e022&lt;BR /&gt;&lt;BR /&gt;This does not happen if the function is placed in non-TCM memory, or if the DSP FW is loaded in debug mode.&lt;BR /&gt;&lt;BR /&gt;Is there anything to look for that may explain the observed issue?&lt;BR /&gt;Could this be related to alignment in memory?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jun 2025 13:08:08 GMT</pubDate>
    <dc:creator>witali_z</dc:creator>
    <dc:date>2025-06-30T13:08:08Z</dc:date>
    <item>
      <title>rt685 HiFi4, erratic DSP code bahaviour when loaded from MCU</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/rt685-HiFi4-erratic-DSP-code-bahaviour-when-loaded-from-MCU/m-p/2125655#M34595</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;I am working on a audio processing demo that runs on a R685-AUD-EVK. I have followed the getting started resources, the MCU and DSP FW is mostly based on "audio_demo_bm" from the SDK.&lt;BR /&gt;&lt;BR /&gt;MCU FW only does basic initialization of GPIOS for a simple user interface.&lt;BR /&gt;DSP FW intializes the I2S and DMA for audio input/output, data is buffered using the "triple buffer" approach as suggested in one of the NXP application notes.&lt;BR /&gt;The actual audio processing function is called from the I2S/DMA receive ISR once 1ms of audio data (i.e. 48 left and 48 right samples) has been received.&lt;BR /&gt;Processing of audio data uses the natureDSP library functions.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So far everything runs as expected when MCU FW and DSP FW are built and run in Debug mode, but I am observing issues when the DSP FW is loaded from the MCU (Release build, &lt;SPAN&gt;DSP_IMAGE_COPY_TO_RAM&lt;/SPAN&gt;&amp;nbsp;= 1).&lt;BR /&gt;&lt;BR /&gt;When the audio processing function (called from the ISR) is placed in ".iram0.text" (instruction TCM memory) the DSP FW runs into an exception.&lt;BR /&gt;xt-ocd prints:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error: Exception details: exccause:0x0, excvaddr:0xff0042, epc:0x240205bc, epcdbg:20e022&lt;BR /&gt;&lt;BR /&gt;This does not happen if the function is placed in non-TCM memory, or if the DSP FW is loaded in debug mode.&lt;BR /&gt;&lt;BR /&gt;Is there anything to look for that may explain the observed issue?&lt;BR /&gt;Could this be related to alignment in memory?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 13:08:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/rt685-HiFi4-erratic-DSP-code-bahaviour-when-loaded-from-MCU/m-p/2125655#M34595</guid>
      <dc:creator>witali_z</dc:creator>
      <dc:date>2025-06-30T13:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: rt685 HiFi4, erratic DSP code bahaviour when loaded from MCU</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/rt685-HiFi4-erratic-DSP-code-bahaviour-when-loaded-from-MCU/m-p/2128782#M34643</link>
      <description>&lt;P&gt;Alignment issue could be a potential issue, I see that this does not happen if it is built for debug. &lt;BR /&gt;When building for release, the compiler may add some optimization levels, which can affect how the example works. &lt;BR /&gt;If the MCU doesn't properly copy&amp;nbsp;.iram0.text&amp;nbsp;or align it, the DSP may fetch invalid instructions—leading to the&amp;nbsp;exccause: 0x0&amp;nbsp;(illegal instruction).&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jul 2025 20:51:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/rt685-HiFi4-erratic-DSP-code-bahaviour-when-loaded-from-MCU/m-p/2128782#M34643</guid>
      <dc:creator>Omar_Anguiano</dc:creator>
      <dc:date>2025-07-04T20:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: rt685 HiFi4, erratic DSP code bahaviour when loaded from MCU</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/rt685-HiFi4-erratic-DSP-code-bahaviour-when-loaded-from-MCU/m-p/2137189#M34773</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/169053"&gt;@Omar_Anguiano&lt;/a&gt;&amp;nbsp; thank you for your reply.&lt;BR /&gt;&lt;BR /&gt;I found out, that the post_build script does not copy the ".iram0.text" section into the binary file which is included into the MCU code, so the actual function code was not present in the memory.&lt;BR /&gt;I have not looked further into alignment issue, as I can currently continue to work with "debug" mode.&lt;BR /&gt;&lt;BR /&gt;BR Witali&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 08:23:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/rt685-HiFi4-erratic-DSP-code-bahaviour-when-loaded-from-MCU/m-p/2137189#M34773</guid>
      <dc:creator>witali_z</dc:creator>
      <dc:date>2025-07-21T08:23:09Z</dc:date>
    </item>
  </channel>
</rss>

