<?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 QN9090 stack pointer in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/QN9090-stack-pointer/m-p/1633339#M14865</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been trying to find a stack / heap problem and finally noticed that the stack (SP) isn't actually initialized in 'startup_qn9090.c' / 'startup_qn9090.cpp' ? I have modified the file adding the following if not a 'WarmMain'.&lt;/P&gt;&lt;P&gt;__asm volatile(&lt;BR /&gt;"LDR R0,=_vStackTop\t\n"&lt;BR /&gt;"MOV SP,R0\t\n"&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;I must be missing something? Could somebody please put me out of my misery - where is the stack normally initialized - will my addition cause destruction and mayhem later?!&lt;/P&gt;&lt;P&gt;TIA.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Apr 2023 17:32:20 GMT</pubDate>
    <dc:creator>alexedge</dc:creator>
    <dc:date>2023-04-13T17:32:20Z</dc:date>
    <item>
      <title>QN9090 stack pointer</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/QN9090-stack-pointer/m-p/1633339#M14865</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been trying to find a stack / heap problem and finally noticed that the stack (SP) isn't actually initialized in 'startup_qn9090.c' / 'startup_qn9090.cpp' ? I have modified the file adding the following if not a 'WarmMain'.&lt;/P&gt;&lt;P&gt;__asm volatile(&lt;BR /&gt;"LDR R0,=_vStackTop\t\n"&lt;BR /&gt;"MOV SP,R0\t\n"&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;I must be missing something? Could somebody please put me out of my misery - where is the stack normally initialized - will my addition cause destruction and mayhem later?!&lt;/P&gt;&lt;P&gt;TIA.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 17:32:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/QN9090-stack-pointer/m-p/1633339#M14865</guid>
      <dc:creator>alexedge</dc:creator>
      <dc:date>2023-04-13T17:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: QN9090 stack pointer</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/QN9090-stack-pointer/m-p/1634138#M14869</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope you are doing well. Could you please clarify what SDK version are you using?&lt;/P&gt;
&lt;P&gt;Also, what do you mean with "stack (SP) isn't actually initialized in 'startup_qn9090.c'"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the section code where the SP register is initialized:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Ricardo_Zamora_0-1681513768907.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/219347i7BC9903531CA2170/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ricardo_Zamora_0-1681513768907.png" alt="Ricardo_Zamora_0-1681513768907.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And also, this other section (warm start) modifies the SP register:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Ricardo_Zamora_1-1681513768911.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/219348i06091D16BAFCF894/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ricardo_Zamora_1-1681513768911.png" alt="Ricardo_Zamora_1-1681513768911.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 23:37:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/QN9090-stack-pointer/m-p/1634138#M14869</guid>
      <dc:creator>Ricardo_Zamora</dc:creator>
      <dc:date>2023-04-14T23:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: QN9090 stack pointer</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/QN9090-stack-pointer/m-p/1634612#M14874</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;in the function ResetISR, the 'beq.n masterboot' is executed so SP not setup.&lt;/P&gt;&lt;P&gt;In the function ResetISR2 WarmMain is false and SP is not setup.&lt;/P&gt;&lt;P&gt;Maybe you could explain masterboot and WarmMain?&lt;/P&gt;&lt;P&gt;SDK is 2.6.4&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 10:51:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/QN9090-stack-pointer/m-p/1634612#M14874</guid>
      <dc:creator>alexedge</dc:creator>
      <dc:date>2023-04-17T10:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: QN9090 stack pointer</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/QN9090-stack-pointer/m-p/1640696#M14907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apologize for a late reply. But, the SP is configure at a library level.&lt;/P&gt;
&lt;P&gt;You can see on the connectivity.ld file:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;PROVIDE(_vStackTop = DEFINED(__user_stack_top) ? __user_stack_top : __top_RAM_Bank7 );&lt;/LI-CODE&gt;
&lt;P&gt;The _vStackTop is used on the g_pfnVectors (from the startup_qn9090.c).&lt;/P&gt;
&lt;P&gt;But, could you please give more details about your stack issue? The SP should be correctly configured at the start of the application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 15:12:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/QN9090-stack-pointer/m-p/1640696#M14907</guid>
      <dc:creator>Ricardo_Zamora</dc:creator>
      <dc:date>2023-04-26T15:12:17Z</dc:date>
    </item>
  </channel>
</rss>

