| Electronic Components Datasheet Search |
|
AN4371 Datasheet(PDF) 23 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4371 Datasheet(HTML) 23 Page - STMicroelectronics |
|
23 / 29 page ![]() DocID025337 Rev 1 23/29 AN4371 Appendix A 28 for(step=0;step<19;step++) { ADC0.STCR3.B.MSTEP = step; // For one-shot mode, defines the current step for algorithms S ADC0.MCR.B.NSTART = 1; // Start ADC0 normal conversion by setting NSTART bit in the MCR if (ADC1.STSR1.B.STEP_RC != 0) { ADC_Self_Test_Fail[step+6] = 1; // Check if No RC-algorithm [step] error has occurred } } } 3.4 Algorithm RC example in CPU scan mode void ADC0_RESISTIVE_CAPACITIVE_SELF_TEST_ScanMode (void) { // Algorithm RC ADC0.MCR.B.PWDN = 0; // Enable ADC0 /* 1 */ ADC0.MCR.B.CTUEN = 0; // CPU mode /* 2 */ ADC0.NCMR[0].B.CH0 = 1; // ADC0 channel 0 is set. Program NCMR0 to select channels to be converted for normal conversion /* 3 */ ADC0.MCR.B.MODE = 1; // Program MCR[MODE] = 0 to select one scan mode /* 4 */ ADC0.STCR1.B.INPSAMP_RC = 0xFF; // Program sampling phase duration for the test conversions /* 5 */ ADC0.STCR3.B.ALG = 0x1; // Select the RC Self Testing algorithm in STCR3.ALG. Default is Algorithm S /* 6 */ ADC0.STCR2.B.EN = 1; // ADC0 Enable self testing channel by setting EN bit in the STCR2 register /* 7 */ ADC0.STAW3R.B.AWDE = 1; // Enable analog watchdog related to the algorithm RC /* 8 */ ADC0.STAW3R.B.THRL = ADC0_Self_Test_Flash_Calibration_Data[0]; // ADC0 Self-Test calibration - RC algo - Low Treshold Value ADC0.STAW3R.B.THRH = ADC0_Self_Test_Flash_Calibration_Data[1]; // ADC0 Self-Test calibration - RC algo - High Treshold Value /* 9 */ |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |