Handling of Inerrupts in IAR

cancel
Showing results for 
Search instead for 
Did you mean: 

Handling of Inerrupts in IAR

Jump to solution
209 Views
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

Tags (2)
0 Kudos
1 Solution
169 Views
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.

View solution in original post

0 Kudos
3 Replies
170 Views
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 Kudos
161 Views
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 Kudos
151 Views
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 Kudos