ADC Self check from safety

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

ADC Self check from safety

Jump to solution
1,505 Views
liuxing_hu
Contributor III

processor:S32K118_64

problem: I need to achieve safety requirement from S32K1XXSM_Rev7.pdf, the following items is the details

1.ADC_SWTEST_VALCHK

liuxing_hu_0-1644889998397.png

 

2.ADC0_SWTEST_REGCRC

liuxing_hu_1-1644890028455.png

 

3. PORT_SWTEST_REGCRC

liuxing_hu_2-1644890055075.png

 

4. ADC_SWTEST_OVERSAMPLING

liuxing_hu_3-1644890079050.png

 

questions: I don't know how to implement them, is there a demo code or guide to provide for s32k118?

Tags (1)
0 Kudos
Reply
1 Solution
1,485 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

View solution in original post

0 Kudos
Reply
2 Replies
1,486 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply
1,481 Views
liuxing_hu
Contributor III

Hello lukaszadrapa

   thanks for your information, I got it

0 Kudos
Reply