Test coverage in example code for safety library

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Test coverage in example code for safety library

507 Views
scotty
Contributor III

Dear software developers at NXP, dear Jozef Sedlak and Pavel Sustek,

I evaluated the example code which is delivered in the file https://www.nxp.com/downloads/en/libraries/IEC60730B_CM4_CM7_3.0.exe from 2019-08-06.

I compiled it with IAR Embedded Workbench for ARM V8.40.1 and tried it out on the evaluation board IMXRT1050-EVKB with jumpers in their default settings.

1. Analog Input/Output Test

a) Does the AIO test covers analog inputs and outputs?
The documentation says "The Analog IO test procedure performs the plausibility check of the digital IO interface of the processor. " This seems to be wrong.

b) I noticed that the function SafetyAnalogTest is not called at all and IEC60730B_aio_test_result in the global structure g_sSafetyCommon is not set. Is this a mistake?!

2. Digital Inputs

I noticed that the variable g_sSafetyCommon.IEC60730B_dio_input_test_result is not set.
Is this a mistake?

3. Flash Memory Test (invariable memory test)

The memory range which is covered by the CRC spans from FLASH_TEST_START_ADDRESS = 0x60002410 to FLASH_TEST_END_ADDRESS = 0x60005000. So, the vector table which starts at 0x60002000 is not tested. Also, depending on the size of the binary output the range may cover or may not cover the complete code.

Can you confirm this or did I miss anything?

4. CPU Clock Frequency

If I see it correctly, the variable g_sSafetyCommon.ui32CpuClkFreq is not set. Is this done intentionally?

Thank you for any further information in advance.

Best regards,

michaeL

Tags (2)
0 Kudos
1 Reply

394 Views
jorge_a_vazquez
NXP Employee
NXP Employee

/Hi Scotty

Could you check the example code from the SDK software package? you can download it from the builder page:

Welcome | MCUXpresso SDK Builder 

For point 2, this code does perform a digital input test on it. For 3, yes, you are correct, the code cover only from FLASH_TEST_START_ADDRESS 0x60002410 to FLASH_TEST_END_ADDRESS 0x60005000. For point 4, there are some variables that in some cases it does not need to use them, so it is not set.

Hope this helps

Best regards

0 Kudos