Reply
Highlighted
Posts: 18
Registered: ‎12-05-2016
Accepted Solution

EFR32MG12 APORT setting for channel 6

Hello All.

I have an EFR32MG12 processor and the PC6 line is used for ADC. From the processor datasheet, I see that  PC6 corresponds to APORT1X -positive and APORT2Y - negative. As I need single input measurement, I have to set in ADC0_SINGLECTRL:

255                  - for NEGSEL

APORT1XCH6 - for POSSEL.

Looking at the chapter 26.5.4 of the Reference manual (page 878), I see the enumeration of options for positive input selection:

 

APORT0XCH0 0 Select APORT0XCH0

APORT0XCH1 1 Select APORT0XCH1

...

APORT1XCH0 32 Select APORT1XCH0
APORT1YCH1 33 Select APORT1YCH1
... ... ........
APORT1YCH31 63 Select APORT1YCH31
APORT2YCH0 64 Select APORT2YCH0
APORT2XCH1 65 Select APORT2XCH1
... ... ........
APORT2XCH31 95 Select APORT2XCH31
APORT3XCH0 96 Select APORT3XCH0
APORT3YCH1 97 Select APORT3YCH1

..

I cannot find the place for "APORT1XCH6" here.

 

After I used high level "ADC_InitSingle( ADC0, &sinit ); 

with 

sinit.posSel = adcPosSelAPORT1XCH6;

POSSEL value is programmed to 0x26 (38) and I see that ADC shows some values depending on input voltage, but I am still in doubt. What do I misunderstand in the reference manual?

Thanks.

Posts: 259
Registered: ‎08-16-2012

Re: EFR32MG12 APORT setting for channel 6

For full description, It would be more than 100 items to be listed in this table.

It skips some entries in sequence with ... for simplicity so the APORT1XCH6 should be 38 (0x26).   

My views are my own and do not necessarily represent the views of Silicon Labs
Posts: 18
Registered: ‎12-05-2016

Re: EFR32MG12 APORT setting for channel 6

Well, all  having relation to APORT1 is in the following subsequence:

 

APORT1XCH0 32 Select APORT1XCH0
APORT1YCH1 33 Select APORT1YCH1
... ... ........
APORT1YCH31 63 Select APORT1YCH31

I assume that the set starting with APORT1YCH1,  ending with APORT1YCH31 and having 31 members cannot contain any "APORT1X..." member. At least it is not intuitively clear. 

Thanks.

Posts: 2,326
Registered: ‎10-14-2014

Re: EFR32MG12 APORT setting for channel 6

You could found this in em_adc.h file.
WeiguoLu
Posts: 18
Registered: ‎12-05-2016

Re: EFR32MG12 APORT setting for channel 6

Thanks.

I looked at it finally and consider my problem solved. Though in my opinion, one should look at a reference to understand a header file, not vice a versa.