processor:S32K118_64
problem: I need to achieve safety requirement from S32K1XXSM_Rev7.pdf, the following items is the details
1.ADC_SWTEST_VALCHK
2.ADC0_SWTEST_REGCRC
3. PORT_SWTEST_REGCRC
4. ADC_SWTEST_OVERSAMPLING
questions: I don't know how to implement them, is there a demo code or guide to provide for s32k118?
Solved! Go to Solution.
Hi,
I’m afraid we don’t have such demo code. But I hope it’s not necessary:
1. ADC_SWTEST_VALCHK
This test says that we shouldn’t read only a result in result registers but we should also check the status bits in mentioned registers.
2. ADC0_SWTEST_REGCRC and 3. PORT_SWTEST_REGCRC
This is explained in the section Cyclic Redundancy Check (CRC). In short, it’s necessary to check the content of configuration registers for given module once per FTTI. You can read the registers “manually” by CPU and calculate CRC using CRC module. Then compare the result with value calculated during development to see if all configuration registers contains expected value. Second option is to use DMA to load the content of registers to CRC. Notice that status and data registers should be excluded, of course.
4. ADC_SWTEST_OVERSAMPLING
This says that we should convert the signal more times at a time instead of doing single conversion only. Then compare all results if all of them are about the same. This is application dependent – real threshold for this decision will depend on measured signal.
Regards,
Lukas
Hi,
I’m afraid we don’t have such demo code. But I hope it’s not necessary:
1. ADC_SWTEST_VALCHK
This test says that we shouldn’t read only a result in result registers but we should also check the status bits in mentioned registers.
2. ADC0_SWTEST_REGCRC and 3. PORT_SWTEST_REGCRC
This is explained in the section Cyclic Redundancy Check (CRC). In short, it’s necessary to check the content of configuration registers for given module once per FTTI. You can read the registers “manually” by CPU and calculate CRC using CRC module. Then compare the result with value calculated during development to see if all configuration registers contains expected value. Second option is to use DMA to load the content of registers to CRC. Notice that status and data registers should be excluded, of course.
4. ADC_SWTEST_OVERSAMPLING
This says that we should convert the signal more times at a time instead of doing single conversion only. Then compare all results if all of them are about the same. This is application dependent – real threshold for this decision will depend on measured signal.
Regards,
Lukas
Hello lukaszadrapa
thanks for your information, I got it