AURIX™ MCU: TC3xx EVADC Converter Diagnostics – KBA236209
Community Translation: オーリックス™・マイクロコントローラ: TC3xx EVADC コンバータ診断 – KBA236209
The TC3xx EVADC (Enhanced Versatile Analog-to-Digital Converter) provides multiple test methods. The converter diagnostics feature validates the ADC block itself. It applies a known internal voltage to the converter (either in addition to or without the original user input voltage). You can then check if the conversion result matches the expected value.
To avoid potential short-circuit current between the internal voltage and the input voltage from the user, you must disconnect the user input voltage during the converter diagnostic process using software. See the “Converter Diagnostics” section of the User’s manual for more information.
A configuration example (you can have different settings) is listed as follows to test the EVADC Group 0 converter:
- VDDM (ADC analog supply voltage) selected as test input voltage.
- Test conversion is conducted through Channel 1 of Group 0.
- Queued Request Source Q2 of Group 0 is used to trigger this test conversion.
The pseudo code may look like the following. This code example enables the diagnostic one time.
Code Listing 1 Code example
//according to data sheet, at least 1.1µs sampling time is required for Converter Diagnostic
//enable Group 0 for diagnostic
//redirect Group 0 Channel 1 to non-existent Channel 24 to disconnect user input voltage
//bit 12 enables Converter Diagnostic for this conversion
//when conversion is finished, user will check if result is as expected
If more tests are planned, you can globally enable diagnostic features in the GLOBTF register.
For more details, see the “Configuration of Test Functions” and “Securing the Test Functions” sections of the the User’s manual.
Note: This KBA applies to the following series of AURIX™ MCUs:
- AURIX™ TC3xx series