ST意法半导体
直播中

彭小海

8年用户 174经验值
私信 关注
[问答]

IVOR1处理异常

你好,


我已经阅读了SPC56EL70(e200z4)的核心手册。我想在SPC5Studio的configuration.xml中使用中断例程处理IVOR1异常。我不清楚我应该在ISR中写什么(什么号码?IVOR1在参考手册的INTC章节中没有出现)

非常感谢你

以上来自于谷歌翻译


以下为原文




Hello,


I have read the core manual of SPC56EL70 (e200z4). I want to handle the IVOR1 exception with an interrupt routine in configuration.xml in SPC5Studio. It's not clear to me what I should write in the ISR in question (what number? IVOR1 is not present in INTC chapter in the reference manual)

Thank you very much

回帖(4)

刘鑫

2018-12-10 16:50:31
你好Stefano,
 
你在谈论机器检查中断(IVOR1)吗?
或ivor1关于软件向量表?
 
 / *软件向量表。从IVOR4访问向量
 仅处理程序。为了声明一个中断处理程序,只需创建
 与矢量名称相同的函数,符号将
 覆盖此处声明的弱符号。* /
已在OSAL组件中完成
 
1)用于IVOR1,(机器检查中断)
你应该更新ivor.s(使用补丁模式)
 
参见e200z4RM.pdf中的第5.7.2章
http://cache.nxp.com/files/32bit/doc/ref_manual/e200z4RM.pdf?fpsp=1&WT_TYPE=Reference%20Manuals&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation&fileExt=.pdf
 
 
2)用于ivor1(软件向量表)(来自IVOR4)
你检查了表473. INTC_0和INTC_1的中断源?
在RM0342中,它存在。
你应该通过OSAL组件启用
 
 最好的祝福
 
 二万

以上来自于谷歌翻译


以下为原文







Hello Stefano ,

Are you talking about Machine Check Interrupt (IVOR1)
or ivor1 about the software vector table ?

        /* Software vectors table. The vectors are accessed from the IVOR4
           handler only. In order to declare an interrupt handler just create
           a function withe the same name of a vector, the symbol will
           override the weak symbol declared here.*/
Already done in OSAL components

1) for IVOR1,  (Machine Check Interrupt)
you should update ivor.s (using patch mode)

cf chapter 5.7.2 in e200z4RM.pdf
http://cache.nxp.com/files/32bit/doc/ref_manual/e200z4RM.pdf?fpsp=1&WT_TYPE=Reference%20Manuals&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation&fileExt=.pdf


2) for ivor1 (software vector table) (from IVOR4)
did you check Table 473. Interrupt sources for INTC_0 and INTC_1 ?
in RM0342 , it is present.
you should enable by OSAL component

   Best regards

            Erwan
举报

彭小海

2018-12-10 16:59:26
我在说第一个。
 
所以:
我可以写一个汇编例程,我必须在某些时候(我不确切地说)添加ivor.s:
 
#if CORE_SUPPORTS_DECREMENTER
 / *
 * _IVOR1
 * /
 .align 4
 .globl _IVOR1
 .type _IVOR1,@ function
_IVOR1:
 / *创建外部堆栈帧(extctx结构)。* /
 stwu%sp,-80(%sp)/ * extctx结构的大小。* /
#if PPC_USE_VLE&& CORE_SUPPORTS_VLE_MULTI
 e_stmvsrrw 8(%sp)/ *保存PC,MSR。 * /
 e_stmvsprw 16(%sp)/ *保存CR,LR,CTR,XER。 * /
 e_stmvgprw 32(%sp)/ *保存GPR0,GPR3 ...... GPR12。 * /
#else / *!(PPC_USE_VLE&& CORE_SUPPORTS_VLE_MULTI)* /
 stw%r0,32(%sp)/ *保存GPR0。 * /
 mfSRR0%r0
 stw%r0,8(%sp)/ *保存PC。 * /
 mfSRR1%r0
 stw%r0,12(%sp)/ *保存MSR。 * /
 mfCR%r0
 stw%r0,16(%sp)/ *保存CR。 * /
 mfLR%r0
 stw%r0,20(%sp)/ *保存LR。 * /
 mfCTR%r0
 stw%r0,24(%sp)/ *保存点击率。 * /
 mfXER%r0
 stw%r0,28(%sp)/ *保存XER。 * /
 stw%r3,36(%sp)/ *保存GPR3 ...... GPR12。 * /
 stw%r4,40(%sp)
 stw%r5,44(%sp)
 stw%r6,48(%sp)
 stw%r7,52(%sp)
 stw%r8,56(%sp)
 stw%r9,60(%sp)
 stw%r10,64(%sp)
 stw%r11,68(%sp)
 stw%r12,72(%sp)
#endif / *!(PPC_USE_VLE&& CORE_SUPPORTS_VLE_MULTI)* /
 
 
/ *例行执行* /
 
 b _ivor_exit
#endif / * CORE_SUPPORTS_DECREMENTER * /
 
我错过了什么吗?

以上来自于谷歌翻译


以下为原文





I'm talking about the first one.

So:
I can just write an assembly routine, and I have to add at some point (I don't know exactly) of ivor.s:

#if CORE_SUPPORTS_DECREMENTER
        /*
         * _IVOR1
         */
        .align      4
        .globl      _IVOR1
        .type       _IVOR1, @function
_IVOR1:
        /* Creation of the external stack frame (extctx structure).*/
        stwu        %sp, -80(%sp)           /* Size of the extctx structure.*/
#if PPC_USE_VLE && CORE_SUPPORTS_VLE_MULTI
        e_stmvsrrw  8(%sp)                  /* Saves PC, MSR.               */
        e_stmvsprw  16(%sp)                 /* Saves CR, LR, CTR, XER.      */
        e_stmvgprw  32(%sp)                 /* Saves GPR0, GPR3...GPR12.    */
#else /* !(PPC_USE_VLE && CORE_SUPPORTS_VLE_MULTI) */
        stw         %r0, 32(%sp)            /* Saves GPR0.                  */
        mfSRR0      %r0
        stw         %r0, 8(%sp)             /* Saves PC.                    */
        mfSRR1      %r0
        stw         %r0, 12(%sp)            /* Saves MSR.                   */
        mfCR        %r0
        stw         %r0, 16(%sp)            /* Saves CR.                    */
        mfLR        %r0
        stw         %r0, 20(%sp)            /* Saves LR.                    */
        mfCTR       %r0
        stw         %r0, 24(%sp)            /* Saves CTR.                   */
        mfXER       %r0
        stw         %r0, 28(%sp)            /* Saves XER.                   */
        stw         %r3, 36(%sp)            /* Saves GPR3...GPR12.          */
        stw         %r4, 40(%sp)
        stw         %r5, 44(%sp)
        stw         %r6, 48(%sp)
        stw         %r7, 52(%sp)
        stw         %r8, 56(%sp)
        stw         %r9, 60(%sp)
        stw         %r10, 64(%sp)
        stw         %r11, 68(%sp)
        stw         %r12, 72(%sp)
#endif /* !(PPC_USE_VLE && CORE_SUPPORTS_VLE_MULTI) */


/*routine execution */

        b           _ivor_exit
#endif /* CORE_SUPPORTS_DECREMENTER */

Do I miss something?
举报

刘鑫

2018-12-10 17:04:51
你好Stefano,
 
我认为应该没问题。
你有什么方法可以产生IVOR1?
 
 最好的祝福
 
 二万

以上来自于谷歌翻译


以下为原文







Hello Stefano ,

i think that it should be ok.
What is your way to generate IVOR1 ?

  Best regards

            Erwan
举报

彭小海

2018-12-10 17:18:20
这是我正在努力的事情:我需要它来处理无法纠正的错误。我必须禁用ECSM报告,因为我不想在我的应用程序中重置DED,但是我没有任何机制来注入DED以避免重置:即使我只为注入启用ECSM报告,因为注入了错误同
 
 
SPP_MCM.EEGR.R = 0x0220; //取消注释这三行以注入无法纠正的错误
 0x00014008:70 1F E7 F4 E_LIS R0,0xFFF4
 0x0001400C:70 E0 02 20 E_LI R7,0x220
 0x00014010:01 06 SE_MR R6,R0
 0x00014012:5C E6 00 4A E_STH R7,0x4A(R6)
*((uint32_t *)0x40002000)= PATTERN;
 0x00014016:62 10 SE_BGENI R0,0x1
 0x00014018:65 20 SE_BSETI R0,0x12
 0x0001401A:70 EA E5 55 E_LIS R7,0x5555
 0x0001401E:70 EA C5 55 E_OR2I R7,0x5555
 0x00014022:01 06 SE_MR R6,R0
 0x00014024:D0 76 SE_STW R7,0x0(R6)
SPP_MCM.EEGR.R = 0x0000;
 0x00014026:70 1F E7 F4 E_LIS R0,0xFFF4
 0x0001402A:48 07 SE_LI R7,0x0
 0x0001402C:01 06 SE_MR R6,R0
 0x0001402E:5C E6 00 4A E_STH R7,0x4A(R6)
 
 
我执行了一次重置:0x00014016:62 10 SE_BGENI R0,0x1
这不是我期望的行为,因为在手册中写入ECC是根据文字计算并在读数时检查的。

以上来自于谷歌翻译


以下为原文





That's something I'm struggling with: I need it in order to handle uncorrectable errors. I must disable ECSM reporting because I don't want a reset on DED in my application, but I don't have any mechanism to inject a DED avoiding reset: even if I enable ECSM reporting just for the injection, as the error is injected with


SPP_MCM.EEGR.R= 0x0220;       //uncomment these three lines to inject uncorrectable error
  0x00014008:   70 1F E7 F4  E_LIS     R0,0xFFF4
  0x0001400C:   70 E0 02 20  E_LI      R7,0x220
  0x00014010:   01 06        SE_MR     R6,R0
  0x00014012:   5C E6 00 4A  E_STH     R7,0x4A(R6)
*((uint32_t *) 0x40002000) = PATTERN;
  0x00014016:   62 10        SE_BGENI  R0,0x1         
  0x00014018:   65 20        SE_BSETI  R0,0x12
  0x0001401A:   70 EA E5 55  E_LIS     R7,0x5555
  0x0001401E:   70 EA C5 55  E_OR2I    R7,0x5555
  0x00014022:   01 06        SE_MR     R6,R0
  0x00014024:   D0 76        SE_STW    R7,0x0(R6)
SPP_MCM.EEGR.R= 0x0000;
  0x00014026:   70 1F E7 F4  E_LIS     R0,0xFFF4
  0x0001402A:   48 07        SE_LI     R7,0x0
  0x0001402C:   01 06        SE_MR     R6,R0
  0x0001402E:   5C E6 00 4A  E_STH     R7,0x4A(R6)


I have a  reset on the execution of: 0x00014016:   62 10        SE_BGENI  R0,0x1         
This is not the behavior I expect, as on the manual is written that ECC is calculated on writings and checked at readings.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分