| Electronic Components Datasheet Search |
|
AN4371 Datasheet(PDF) 20 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4371 Datasheet(HTML) 20 Page - STMicroelectronics |
|
20 / 29 page ![]() Appendix A AN4371 20/29 DocID025337 Rev 1 3 Appendix A Example source code can be found in these appendixes. 3.1 Test Flash copy function example Read_Self_Test_calibration_data function is necessary to be executed from RAM. #pragma ghs section text=".ramcode" void Read_Self_Test_calibration_data (void) { uint32_t address = 0x0; uint32_t i = 0; /* map Test Flash sector into Flash memory stating 0x0 */ SSCM.SCTR.B.TFE = 1; for (i=0;i<22;i++) { Raw_Test_Flash_Calibration_Data[i] = (*(volatile uint32_t *)address); address = address + 0x4; } SSCM.SCTR.B.TFE = 0; } #pragma ghs section 3.2 Algorithm S example in CPU scan mode void ADC0_SUPPLY_SELF_TEST_ScanMode(void) { // Algorithm S 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] = 1 to select Scan Mode mode /* 4 */ ADC0.STCR1.B.INPSAMP_S = 0xFF; // Program sampling phase duration for the test conversions /* 5 */ |
|
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 |