Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Not applicable
I have to scan 64 ADC channels. We added an external mux to the 144 pin chip to have 32 overall channels. These lead into another mux system which allows the chip to connect to channels 0-31 or 32-63..

I need to scan the first set several times, then change the external mux and repeat for the second set of channels. Because of the need to switch, it looks like I want to trigger scanning 32 channels, interrupt, then make my decision to control the 64:32 external mux.

I am confused as to which Dave App is most appropriate. It looks like ADC002 is the right choice, but it seems to be limited to 8 ADC channels. Do I need to have 4 instances? Is this allowed? Or is there a better choice of Dave app?
4 Replies
Hi danbeadle,

I would like to highlight that the XMC4500 (144pin) has 32 channels.
But some of these channels shared the same physical input pin.
As a result, there is only 26 input ADC pin for the 144pin device.

Maybe, you have to re-think about the implementation topolgy... (Using 3 MUX ???)
Not applicable
Thank you for your help.

According to our local FAE, the way to get the "extra" pins is to use an external mux.. The chip controls EMUX, but it is not documented very well.

It seems that I can create the "Missing" 6 pins by running those signals through an external 6:1 mux, then running that signal into one of the existing. (Of course, that consumes yet another pin, so I need a 7:1 mux)...

I am trying to figure out if I need one ADCCH001 app per virtual channel or one per group of externally muxed channels.

The user manual is a little thin on details of using the mux..
"One per group of externally muxed channels"

I will assume that you will be using "MCU ADC multiplex feature" to create 32 channels.
I will assume that you will be using external MUX to double to 64 channels.

To create 32 channels... (Using 25 + 1 physical ADC pin).. you will need the 8:1 MUX for one ADC kernel.
I will recommend to use four instance of the ADC002 (Sequential Queue source).
As we only need 1 instance of the 8:1 MUX of the ADC feature:
- Enable the "External MUX Control" for one of the ADCCH001/x
- The setting of the MUX can be configured in the ADCGROUP001/x

For your information:
ADC001 - Background scan source
ADC002 - Sequential Queue source
ADC003 - Scan source
Not applicable

I struggled over the weekend with ADC002 and found my missing piece: The number of external items to scan is controled by ADCGROUP001 EMUX Start Select. The documentation was not very helpful there - there is really no discussion of why you woudl want to set that. I figured out that you set it to the number of channels on the external mux.

Next, you set External Mux Mode ot something other than "Software" My application uses Sequence Mode to step through each channel. Select Binary or Grey Code as appropriate. I used Grey.

Then I had to set ADCCH001 for the pin connected to the output of the mux.. Set External Mux control to ENABLE. (This is my Channel A)

Finally, I set the entry queue to convert Channel A 5 times (the number of items on my external mux)

I had had everything except the EMUX Start Select.. That was the magic that made it work... At least now I am getting EMUX select pins that make sense..

I still have to sort out the readings.