Handling of Inerrupts in IAR

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Handling of Inerrupts in IAR

跳至解决方案
901 次查看
Bannai30
Contributor I

Hello,

Can someone help me how to check the interrupt function while performing the test using SCST library,  im performing the core test and how should I check if all the 44 tests are getting executed without interrupt? I am performing them in IAR.
result=m4_scst_execute_core_tests(0, 43);
return result;

Thank You

标记 (2)
0 项奖励
1 解答
861 次查看
martinkaspar-r3
NXP Employee
NXP Employee

Hello,

 please use the following example of code.

        /* Execute all tests */

       result = m4_scst_execute_core_tests(0,43);

                     …

      /* Check SCST result ! */

       if (result==M4_SCST_TEST_WAS_INTERRUPTED)

       {

           /* Some, test was interrupted.

               Please check m4_scst_last_executed_test_number variable and run

               interrupted test + not executed tests again  */          

       }

       else if (result == 0x929940F1)

       {

           /* All tests passed */

       }

       else

       {

           /* Error, please check m4_scst_last_executed_test_number  variable

                to have number of failed test */  

       }

 

Note, that value 0x929940F1 represents XOR operation over the 32-bit signatures of all atomic tests requested for execution. These signatures are documented in the M4 SCST User Manual document.

在原帖中查看解决方案

0 项奖励
3 回复数
862 次查看
martinkaspar-r3
NXP Employee
NXP Employee

Hello,

 please use the following example of code.

        /* Execute all tests */

       result = m4_scst_execute_core_tests(0,43);

                     …

      /* Check SCST result ! */

       if (result==M4_SCST_TEST_WAS_INTERRUPTED)

       {

           /* Some, test was interrupted.

               Please check m4_scst_last_executed_test_number variable and run

               interrupted test + not executed tests again  */          

       }

       else if (result == 0x929940F1)

       {

           /* All tests passed */

       }

       else

       {

           /* Error, please check m4_scst_last_executed_test_number  variable

                to have number of failed test */  

       }

 

Note, that value 0x929940F1 represents XOR operation over the 32-bit signatures of all atomic tests requested for execution. These signatures are documented in the M4 SCST User Manual document.

0 项奖励
853 次查看
Bannai30
Contributor I

Hello @martinkaspar-r3 ,

Thank you for the solution. When I am performing the tests I see from 1 to 42 tests are failing and only 43rd (The last test) is executed, I am wondering if the tests need specific conditions of the processor maybe like enabling or disabling interrupts or setting executional rights or setting environment variables correctly. I am performing them on IAR. Can you please help me where exactly am I doing it the wrong way?

0 项奖励
843 次查看
martinkaspar-r3
NXP Employee
NXP Employee

Hello,

there are no specific conditions for test invocation. Our recommendation is to run all tests from the Thread Privileged mode, please see Table 11 in the M4 SCST User Manual document.

 Note, that every combination of ”start” and “end” indexes requires the specific accumulated signature. These signatures are computed by means of XOR operation over the 32-bit signatures of tests requested for execution. This means that the following calls “result = m4_scst_execute_core_tests(0,43)” and “result = m4_scst_execute_core_tests(1,42)” will return different accumulated signatures!

 We assume that result = m4_scst_execute_core_tests(0,43) is working correctly in our example. For different combinations of tests please use attached document where you can find accumulated signatures for all possible combinations of “start” and “end” indexes.

0 项奖励