PSoC 5 and Analog Mux in differential mode issues

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

cross mob
Anonymous
Not applicable

Hello

   

I have currently migrated my project from a PSoC 3 to 5 (CY8CKIT-014). My analog design uses an Analog Mux Sequencer in differential mode with 6 dual inputs from GPIO. The Mux is connected directly to a differential DelSig ADC, 16-bit @ 1000 sps in multi-sample mode. Conversion results are stored in an array, and in the ADC's interrupt there is a logic to stop conversion, change mux channel and start conversion again.

   

In the PSoC 3 this design was working perfeclty. But when I switched to the PSoC 5 I started to get weird results from the ADC. Some input channels are converted by ADC, but output values have significant offset, and seem to be attenuaded. Other channels (mainly evenly numbered) return always the same value, regardless of voltage applied to GPIO. Furthermore this output value seems to change with PSoC reset.

   

I tried to use both Analog Mux and Analog Sequencer Mux, with no luck. When I connect pins directly to the ADC, conversion works properly. Using the Analog Mux in Single mode also works. So, at the moment, I ended up with two seperate muxes to drive both inputs of the ADC. It works, but my analog routing now looks like a spaghetti.

   

I am using PSoC Creator 1.0 Production (7727). 

   

I can post more details if necessary.

   

 

   

Does anybody else had similar issues with those muxes? Or mabye there is somebody who has working project with muxes in differential mode? I would be grateful for any iformation.

   

 

   

Regards

   

Tom

   


 

   


 

0 Likes
3 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

I had a similiar problem - I tried to convert the AppNote about using the Mux Sequencer with the SAR ADC into using the Delta-Sigma-ADC. The result was that thet mux didn't seem to switch between the channels - I always got the same data for all of them. The reason semed to be that the EOC signal from the ADC didn't got routed to the Mux input (but I know it worked because I used EOC to trigger the DMA requests).

   

I solved it by doing everything in software (reading the result and switching the channel).

0 Likes
Anonymous
Not applicable

Hi Tom/ hli,

   

 

   

The EOC signal of ADC in PSoC5 cannot be connected to interrupt component. This errata has been documented for PSoC5 ES1.

   

It states as follows:

   

 Delta Sigma ADC End-of-Conversion
■ PROBLEM DEFINITION
End-of-conversion (EOC) is signaled by a status register bit, decimator interrupt, decimator DMA, and DSI
routable signal. The DSI routable signal does not work. The CPU can poll the status register bit or use the
decimator interrupt or decimator DMA.
■ PARAMETERS AFFECTED
NA
■ TRIGGER CONDITION(S)
NA
■ SCOPE OF IMPACT
The ADC end-of-conversion (EOC) output of the PSoC Creator component can only be used to route to one
DMA channel. The EOC output cannot be used to route through the DSI routing to any other digital resources.
The decimator DMA route bypasses the DSI routing avoiding this issue. The decimator interrupt integrated
into the PSoC Creator component also bypasses the DSI routing. All other possible EOC connections require
DSI routing.
■ WORKAROUND
The CPU can poll the EOC bit in the status register or use the decimator interrupt to signal the digital system
using firmware and a control register.
■ FIX STATUS
Silicon revision fix available in ES2.

   

 

   

It can be found here: http://www.cypress.com/?docID=27094

   

When 2 or more channels are used for ADC, then the ADC should be configured for multichannel mode. The StartConvert() and StopConvert() APIs can be used to start and stop the conversion, respectively, after every channel change.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hli, dasg - thank you for your answers. 

   

In my design I'm not using the EOC signal. AMux switching and sample restart code resides in the ADC Interrupt file. I have discovered that the AMux starts to behave oddly when I connect it with two pins sharing the same Analog Global bus (P6[2] and P6[6] in my case). When I am using other pins, the AMux seems to work correctly. 

   

I looked at the PSoC errata, but I couldn't find any item related to this issue.

   

I have attached a simple project showing my problem. Channels 0, 2 and 3 of the AMux should all ouptut the same value. Channel 1 inputs are reversed so it should output similiar value, but with changed sign. But, output values look like this (channel 0 to 3; input voltages are about 1.2V with a few mV difference):

   

 20795 -260 6190 12573

   

So only channel 1 shows correct value. When I use pins P6[4] and P6[2] I get the correct results:

   

208 -224 207 220

   

Do I have an error in my design? Or maybe there is some bug in the PSoC Creator AMux routing?

   

 

   

@dasg:

   

In your last sentence you wrote about "multichannel mode". Did you mean "Multi Sample" conversion mode in ADC configuration screen, or some other setting?

   

 

   

Regards
Tom

0 Likes