Firmware User Manual (AE-step)
111
Revision 1.02
2019-04-24
TLE984x Firmware User Manual
Example
0x4C
ADC1_FILT_UP_CTRL
0x50
ADC1_FILTCOEFF0_11
0x54
ADC1_CAL_CH10_11
0x58
ADC1_CAL_CH8_9
0x5C
ADC1_CAL_CH6_7
0x60
ADC1_CAL_CH4_5
0x64
ADC1_CAL_CH2_3
0x68
ADC1_CAL_CH0_1
0x6C
ADC1_SQ10_11
0x70
ADC1_SQ8_9
0x74
ADC1_SQ6_7
0x78
ADC1_SQ4_5
Table 6-9 100TP Analog Module Trimming example
Code example
#define PAGE0
(uint32_t 0)
#define ADC1_CNT_UPPER_OFFSET (uint32_t 0x0C)
#define ADC1_CNT_UPPER_LEN
(uint32_t sizeof(ADC1_TRIM_Data_table))
uint32_t ADC1_TRIM_Data_table[]= {0x11111111, 0x12121212, 0x13131313};
int32_t User_Trimming_100TP(void)
{
int32_t status=0;
status =
user_nvm_100tp_write
(PAGE0,
ADC1_CNT_UPPER_OFFSET
,
ADC1_TRIM_Data_table,
ADC1_CNT_UPPER_LEN);
return status;
}
Description
This function write into the 100TP page 0 at the offset 0x0C, which correspond to the address allowed for
ADC1_CNT8_11_UPPER. The length of the data to write is 12 bytes, which means 3 words :
ADC1_CNT8_11_UPPER, then ADC1_CNT4_7_UPPER and finally ADC1_CNT0_3_UPPER.
This function trims the following registers :
ADC1_CNT8_11_UPPER = 0x11111111
ADC1_CNT4_7_UPPER = 0x12121212
ADC1_CNT0_3_UPPER = 0x13131313
Table 6-8 100TP page 0 and page 1 : Analog Module Trimming registers