<?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: HardFault on XBARA_SetOutputSignalConfig in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2069221#M33881</link>
    <description>&lt;P&gt;I think I know the issue. Both the reference manual's XBARA memory map and register description, and the SDK's MIMXRT1011.h says that on this chip, the XBARA_SEL is up to XBARA_SEL65 - which means it has 130 outputs.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="powerfeatherdev_1-1743055000292.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/330019iE6768D3C28A4AEB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="powerfeatherdev_1-1743055000292.png" alt="powerfeatherdev_1-1743055000292.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However, in the RT1010 reference manual's description of the peripheral, it says it only has 31 outputs:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="powerfeatherdev_0-1743054933417.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/330017i378687D6AF55B1BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="powerfeatherdev_0-1743054933417.png" alt="powerfeatherdev_0-1743054933417.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I take it that the actual number of outputs is correct, since when I tried deleting&amp;nbsp;XBARA_SEL16-XBARA_SEL65 in the&amp;nbsp;SDK's MIMXRT1011.h XBARA_Type definition, I was able to configure an interrupt to fire on the output's edge transition.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So I guess the root cause of this is a mistake in the RT1011's SVD definition, from which parts of the reference manual and SDK headers are auto-generated. I think the current definition is mistakenly copied over from RT1020, whch *does* have 130 XBARA outputs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Mar 2025 06:00:45 GMT</pubDate>
    <dc:creator>powerfeatherdev</dc:creator>
    <dc:date>2025-03-27T06:00:45Z</dc:date>
    <item>
      <title>HardFault on XBARA_SetOutputSignalConfig</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2066344#M33834</link>
      <description>&lt;P&gt;I'm trying to adapt the RT1020 XBAR example on the RT1010. The sample project for an EVKMIMXRT1010 is attached.&lt;/P&gt;&lt;P&gt;However, there is a &lt;SPAN&gt;HardFault&lt;/SPAN&gt; when&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;XBARA_SetOutputSignalConfig is called. Specifically, in the "&lt;/SPAN&gt;&lt;SPAN&gt;regVal._u16 = XBARA_CTRLx(base, regIndex)"&amp;nbsp;&lt;/SPAN&gt;line, when the CTRL register is accessed.&lt;/P&gt;&lt;P&gt;I don't think it's related to the clock, since I call XBAR_Init which initializes the XBAR clock, and&amp;nbsp;&lt;SPAN&gt;XBARA_SetSignalsConnection succeeds - which accesses registers in the XBAR peripheral.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Why does the HardFault occur?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:20:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2066344#M33834</guid>
      <dc:creator>powerfeatherdev</dc:creator>
      <dc:date>2025-03-21T13:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault on XBARA_SetOutputSignalConfig</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2067837#M33860</link>
      <description>&lt;P&gt;Any update regarding this issue?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 14:59:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2067837#M33860</guid>
      <dc:creator>powerfeatherdev</dc:creator>
      <dc:date>2025-03-25T14:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault on XBARA_SetOutputSignalConfig</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2069012#M33878</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/243693"&gt;@powerfeatherdev&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try doing the following changes on your code. First change the XBARA_CTRLx macro to the following XBARA_SELx:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;/* Macros for entire XBARA_CTRL register.  */
//#define XBARA_CTRLx(base, index) (((volatile uint16_t *)(&amp;amp;((base)-&amp;gt;CTRL0)))[(index)])
#define XBARA_SELx(base, output) (((volatile uint16_t *)(&amp;amp;((base)-&amp;gt;SEL0)))[(uint32_t)(output) / 2UL])&lt;/LI-CODE&gt;
&lt;P&gt;Then change the XBAR_CTRLx calls to XBAR_SELx on XBARA_SetOutputSignalConfig:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;void XBARA_SetOutputSignalConfig(XBARA_Type *base,
                                 xbar_output_signal_t output,
                                 const xbara_control_config_t *controlConfig)
{
    uint8_t outputIndex = (uint8_t)output;
    uint8_t regIndex;
    uint8_t byteInReg;
    xbara_u8_u16_t regVal;

    assert(outputIndex &amp;lt; (uint32_t)FSL_FEATURE_XBARA_INTERRUPT_COUNT);

    regIndex  = outputIndex / 2U;
    byteInReg = outputIndex % 2U;

    regVal._u16 = XBARA_SELx(base, regIndex);


    /* Don't clear the status flags. */
    regVal._u16 &amp;amp;= (uint16_t)(~(XBARA_CTRL0_STS0_MASK | XBARA_CTRL0_STS1_MASK));

    regVal._u8[byteInReg] = (uint8_t)(XBARA_CTRL0_EDGE0(controlConfig-&amp;gt;activeEdge) |
                                      (uint16_t)(((uint32_t)controlConfig-&amp;gt;requestType) &amp;lt;&amp;lt; XBARA_CTRL0_DEN0_SHIFT));

    XBARA_SELx(base, regIndex) = regVal._u16;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if this works.&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Edwin.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 21:59:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2069012#M33878</guid>
      <dc:creator>EdwinHz</dc:creator>
      <dc:date>2025-03-26T21:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault on XBARA_SetOutputSignalConfig</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2069157#M33880</link>
      <description>&lt;P&gt;Isn't XBARA_SELx a fundamentally different register than XBARA_CTRLx? See the following snippets of the RT1010 Reference Manual:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2025-03-27 12-42-18.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/329996i78BFD8AA8854F650/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot from 2025-03-27 12-42-18.png" alt="Screenshot from 2025-03-27 12-42-18.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2025-03-27 12-42-41.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/329997i921578385F6B7841/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot from 2025-03-27 12-42-41.png" alt="Screenshot from 2025-03-27 12-42-41.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So your solution might 'technically' solve the issue of HardFault on calling&amp;nbsp;XBARA_SetOutputSignalConfig, but I don't see how the peripheral would work as I want to - which is to raise an interrupt on XBAR_OUTx edge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/186731"&gt;@EdwinHz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2025 03:49:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2069157#M33880</guid>
      <dc:creator>powerfeatherdev</dc:creator>
      <dc:date>2025-03-27T03:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault on XBARA_SetOutputSignalConfig</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2069221#M33881</link>
      <description>&lt;P&gt;I think I know the issue. Both the reference manual's XBARA memory map and register description, and the SDK's MIMXRT1011.h says that on this chip, the XBARA_SEL is up to XBARA_SEL65 - which means it has 130 outputs.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="powerfeatherdev_1-1743055000292.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/330019iE6768D3C28A4AEB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="powerfeatherdev_1-1743055000292.png" alt="powerfeatherdev_1-1743055000292.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However, in the RT1010 reference manual's description of the peripheral, it says it only has 31 outputs:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="powerfeatherdev_0-1743054933417.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/330017i378687D6AF55B1BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="powerfeatherdev_0-1743054933417.png" alt="powerfeatherdev_0-1743054933417.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I take it that the actual number of outputs is correct, since when I tried deleting&amp;nbsp;XBARA_SEL16-XBARA_SEL65 in the&amp;nbsp;SDK's MIMXRT1011.h XBARA_Type definition, I was able to configure an interrupt to fire on the output's edge transition.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So I guess the root cause of this is a mistake in the RT1011's SVD definition, from which parts of the reference manual and SDK headers are auto-generated. I think the current definition is mistakenly copied over from RT1020, whch *does* have 130 XBARA outputs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2025 06:00:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HardFault-on-XBARA-SetOutputSignalConfig/m-p/2069221#M33881</guid>
      <dc:creator>powerfeatherdev</dc:creator>
      <dc:date>2025-03-27T06:00:45Z</dc:date>
    </item>
  </channel>
</rss>

