<?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>S32KのトピックRe: Interrupt not work in application</title>
    <link>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1181501#M8779</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At first, could you, please, check if the VTOR is set correctly after the jump into the application? Just to be sure if it is relocated.&lt;/P&gt;
&lt;P&gt;Which MCU do you use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Diana&lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2020 13:30:45 GMT</pubDate>
    <dc:creator>dianabatrlova</dc:creator>
    <dc:date>2020-11-11T13:30:45Z</dc:date>
    <item>
      <title>Interrupt not work in application</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1180787#M8762</link>
      <description>&lt;P&gt;I have an application, without OS, which works well alone. So I think I have set necessary interrupt enable. But after being integrated with bootloader provided by third party, normal functions work well but interrupt became not work. I have relocated VTOR in cstart.s as following:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/****************************************************************************/&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/* Settings */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/****************************************************************************/&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;#define ROM_START (0x00076000) /* ROM start address (align = 32) */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;#define ROM_END (0x0007EFFF) /* ROM end address (align = 32) */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;#define STACK_SIZE (0x1000) /* Stack size in byte */&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/****************************************************************************/&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/* System stack */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/****************************************************************************/&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;PUBLIC __stack_top&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;SECTION .stack:DATA:REORDER:ROOT(8)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;DATA&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;__stack_btm:&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;DS8 STACK_SIZE&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;__stack_top:&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/****************************************************************************/&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/* C startup */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/****************************************************************************/&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;PUBLIC __iar_program_start,__program_start&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;EXTWEAK __iar_init_core&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;EXTWEAK __iar_init_vfp&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;EXTWEAK __iar_data_init3&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;SECTION .text:CODE:REORDER(2)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;THUMB&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/*----------------------------------*/&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/* Entry */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;/*----------------------------------*/&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;__iar_program_start:&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;__program_start:&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;cpsid i&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;ldr r0 , =__stack_top&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;mov r13, r0&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;ldr r0 , =ROM_START&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;ldr r1 , =0xE000ED08 /* VTOR */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;str r0, [r1, #0]&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;FUNCALL __program_start, __iar_init_core&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;bl __iar_init_core&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;....&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The linker.icf is as following:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;define memory mem with size = 4G;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;define region IROM_region = mem:[from 0x00076410 to 0x0007efff]; // Code Flash&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;define region EROM_region = mem:[from 0x10000000 to 0x1000ffff]; // Data Flash&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;define region ERAM_region = mem:[from 0x14000000 to 0x14000fff]; // Flex RAM&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;define region IRAM_region = mem:[from 0x1fff8000 to 0x1fffffff] // SRAM_L&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | mem:[from 0x20000000 to 0x20006fff]; // SRAM_U&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;initialize by copy { rw };&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;do not initialize { section .noinit, section .stack };&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;place at address mem:0x00076000 { ro section .intvec, ro section .trmval };&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;place at address mem:0x00076400 { ro section .flscfg };&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;place in IROM_region { ro };&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;place in EROM_region { ro section .dflash };&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;place in IRAM_region { first block CSTACK { section .stack }, rw };&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;place in ERAM_region { rw section .flxram };&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I doubt&amp;nbsp; the new vector is not recognized or there is setting in bootloader that effect interrupt enable, is anyone can give me some hints?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 10:21:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1180787#M8762</guid>
      <dc:creator>ZhaiHui</dc:creator>
      <dc:date>2020-11-11T10:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt not work in application</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1181501#M8779</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At first, could you, please, check if the VTOR is set correctly after the jump into the application? Just to be sure if it is relocated.&lt;/P&gt;
&lt;P&gt;Which MCU do you use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Diana&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 13:30:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1181501#M8779</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-11-11T13:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt not work in application</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1181902#M8784</link>
      <description>&lt;P&gt;Hello Diana,&lt;/P&gt;&lt;DIV&gt;We found the BASEPRI is set to 16 by bootloader and&amp;nbsp;&lt;SPAN&gt;priority of LPUART interrupts are set as 15. After we change the priority of LPUART to 0, the interrupt worked. We think even priority of LPUART is 15, it should also work as it is higher than 16 of BASEPRI, isn't right?&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 13 Nov 2020 01:42:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1181902#M8784</guid>
      <dc:creator>ZhaiHui</dc:creator>
      <dc:date>2020-11-13T01:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt not work in application</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1182334#M8800</link>
      <description>&lt;P&gt;Hello Diana,&lt;BR /&gt;We are using&amp;nbsp;FS32K144HAT0VLLR. And we confirmed that VTOR changed to&amp;nbsp;0x00076000 as we set at the start of our application in&amp;nbsp;cstart.s.&lt;BR /&gt;By the way, as we can not debug the software after integrating with bootloader provided by third party, we modified the application a little and confirmed the VTOR value by reading it and sent it out by CAN message.&lt;BR /&gt;When read&amp;nbsp;NVICISER and NVICISPR we found that LPUART interrupts which we want to use are enabled but in pending state. But besides LPUART interrupts, there interrupts which we not use enabled or pended. We tried to disable them and clearing the pending ones by following code at start of application, but it does not work, the unexpected interrupts are still enabled or pended.&lt;BR /&gt;FSL_NVIC-&amp;gt;ICER[0] = 0xFFFFFFFF;&lt;BR /&gt;FSL_NVIC-&amp;gt;ICER[1] = 0xFFFFFFFF;&lt;BR /&gt;FSL_NVIC-&amp;gt;ICER[2] = 0xFFFFFFFF;&lt;BR /&gt;FSL_NVIC-&amp;gt;ICER[3] = 0xFFFFFFFF;&lt;BR /&gt;FSL_NVIC-&amp;gt;ICPR[0] = 0xFFFFFFFF;&lt;BR /&gt;FSL_NVIC-&amp;gt;ICPR[1] = 0xFFFFFFFF;&lt;BR /&gt;FSL_NVIC-&amp;gt;ICPR[2] = 0xFFFFFFFF;&lt;BR /&gt;FSL_NVIC-&amp;gt;ICPR[3] = 0xFFFFFFFF;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 12:55:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1182334#M8800</guid>
      <dc:creator>ZhaiHui</dc:creator>
      <dc:date>2020-11-12T12:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt not work in application</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1183161#M8818</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your information.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;"But besides LPUART interrupts, there interrupts which we not use enabled or pended."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Have you disabled and clear pending interrupts&amp;nbsp;in the bootloader before the jump into the application?&lt;/P&gt;
&lt;P&gt;In this case, the SW reset before the jump can be useful, after that there should not be any pending interrupt.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you, please, check also the ICSR register?&lt;/P&gt;
&lt;P&gt;About BASEPRI, it should work as you described according to the CortexM4 manual (the higher the value, the lower priorities):&lt;/P&gt;
&lt;P&gt;"When BASEPRI is set to a nonzero value, it prevents the activation of all exceptions with the same or lower priority level as the BASEPRI value."&lt;/P&gt;
&lt;P&gt;Note: When I'm using S32DS I cannot debug the code after the jump into the application, but I have access to the registers. Meaby your IDE has the same feature.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Diana&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 13:34:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-not-work-in-application/m-p/1183161#M8818</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-11-13T13:34:37Z</dc:date>
    </item>
  </channel>
</rss>

