Mar 10, 2020
03:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 10, 2020
03:28 AM
When using ADC_MEASUREMENT_ADV with ADC_SCAN_APP setting, the created mask for loading GxASSEL is wrong
e.g.
new project for XMC4400x64
add ADC_MEASUREMENT_ADV: Number of Channels 3
config Pin Allocator: Channel_A P14.1, Channel_B P14.3, Channel_C P14.5
Results in (adc_measurement_adc_conf.c):
e.g.
new project for XMC4400x64
add ADC_MEASUREMENT_ADV: Number of Channels 3
config Pin Allocator: Channel_A P14.1, Channel_B P14.3, Channel_C P14.5
Results in (adc_measurement_adc_conf.c):
.insert_mask = 41 //0b00101001what will be loaded in G0ASSEL register. But it should be 0b00101010 in this case.
- Tags:
- IFX
2 Replies
Mar 10, 2020
09:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 10, 2020
09:30 AM
Hi,
The setting is correct since the alias feature is being used, i.e. the alias Feature redirects conversion requests defined at channels CH0 to other analog input channels.
See in the generated code the configuration of ADC_MEASUREMENT_ADV_0_Channel_A_ch_config
Regards,
Jesus
The setting is correct since the alias feature is being used, i.e. the alias Feature redirects conversion requests defined at channels CH0 to other analog input channels.
See in the generated code the configuration of ADC_MEASUREMENT_ADV_0_Channel_A_ch_config
Regards,
Jesus
Mar 12, 2020
02:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 12, 2020
02:24 AM
hmm, ok, didn't know that feature ... the problem in my case was the following:
I had configured two apps:
ADC_MEASUREMENT_ADV_0 on P14.3 and P14.4
ADC_MEASUREMENT_ADV_1 on P14.8, P14.9 and P14.14
so my expectation was:
adc0 scans its channels 3 and 4 (G0ASSEL=0b00011000)
adc1 scans its channels 0,1 and 6 (G1ASSEL=0b01000011)
but G1ASSEL in my case was 0b01011011, so for me it looked like channel 3 und 4 of adc1 get converted during the scan. I noticed this because I was getting wrong results for adc1_ch0. Looking at the result register I saw that RESD[0].CHNR also jumped between 0, 3 and 4.
So I thougth the scan settings are wrong and the otherwise unconfigured channels 3 and 4 of adc1 just get written into result0 by default. Unfortunately I'm not able to reproduce this in an empty project, so maybe something else was going on. I need to check that again.
I had configured two apps:
ADC_MEASUREMENT_ADV_0 on P14.3 and P14.4
ADC_MEASUREMENT_ADV_1 on P14.8, P14.9 and P14.14
so my expectation was:
adc0 scans its channels 3 and 4 (G0ASSEL=0b00011000)
adc1 scans its channels 0,1 and 6 (G1ASSEL=0b01000011)
but G1ASSEL in my case was 0b01011011, so for me it looked like channel 3 und 4 of adc1 get converted during the scan. I noticed this because I was getting wrong results for adc1_ch0. Looking at the result register I saw that RESD[0].CHNR also jumped between 0, 3 and 4.
So I thougth the scan settings are wrong and the otherwise unconfigured channels 3 and 4 of adc1 just get written into result0 by default. Unfortunately I'm not able to reproduce this in an empty project, so maybe something else was going on. I need to check that again.