configuring SARMUX on port 9

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

cross mob
MaH_4035971
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

Hello,

I am trying to develop a device that has 10 analog inputs and I selected a PSoC63 uC precisely because of the number of configurable analog pins. For routing reasons I am using 6 pins on port 10 and 4 on port 9 (2,3,4 and 5). I am aware that port 10 is the preferred analog port and that others are slightly suboptimal however I made sure that  the most sensitive sensors were connected to P10 pins.

It seems pretty easy to configure P10 as it is directly coupled to the SARMUX but P9 seems to be used by default for buffering (see data sheet snapshot). What is the recommended method, in ModusToolbox (not PSoC Creator), to connect P9 to the ADC ?

Many thanks !

M

image_adc-aa94ae20ded592d8308e3d03c5333fa6bc75e1e2.png

0 Likes
1 Solution
AchimE_41
Employee
Employee
10 sign-ins 5 sign-ins First comment on KBA

Hi,

Although it is not supported by the configuration tool right now, it can be done by software configuration of the analog switches.

For a reference please have a look at the ADC documentation of the PDL (in ModusToolbox open the configurator, select the ADC, on the top right is a link to the SAR Documentation)

At the bottom of the ADC overview page you will find example configurations for using the internal DieTemp, external Pins (AMUXBUSA/B) and even the OpAmps as ADC inputs.

Just a hint for optimizations:

If you are still able to change your design and don't use the internal OpAmps, you could use them as input buffers for the ADC (P9[2,3 or 4] to P9[0 or 6], P9[5] is already correct). Due to the design of the PSoC Analog routing, there are only two connections to the AMUXBUS, but you have 4 GPIOs connected externally. This means, that at the moment you have to witch between your "external" GPIOs in software an start the ADC measurement after the channel is setup. This is not a big deal if just a limited amount of sampling done, but if all pins are scanned each cycle it might generate unwanted software overhead. But in addition the ADCMUX has two direct connections to the OpAmp outputs. So, by switching your pins to the OpAmps, you can have the ADCMUX be hardware controlled and just wait for the results in your software.

kind regards,

Achim

View solution in original post

0 Likes
4 Replies
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

The current version Modus Toolbox does not support connection to on-chip resources. The only supported connections are SAR port pins.

Therefore, the pins out of port10 are not available for SAR ADC inputs.

0 Likes
AchimE_41
Employee
Employee
10 sign-ins 5 sign-ins First comment on KBA

Hi,

Although it is not supported by the configuration tool right now, it can be done by software configuration of the analog switches.

For a reference please have a look at the ADC documentation of the PDL (in ModusToolbox open the configurator, select the ADC, on the top right is a link to the SAR Documentation)

At the bottom of the ADC overview page you will find example configurations for using the internal DieTemp, external Pins (AMUXBUSA/B) and even the OpAmps as ADC inputs.

Just a hint for optimizations:

If you are still able to change your design and don't use the internal OpAmps, you could use them as input buffers for the ADC (P9[2,3 or 4] to P9[0 or 6], P9[5] is already correct). Due to the design of the PSoC Analog routing, there are only two connections to the AMUXBUS, but you have 4 GPIOs connected externally. This means, that at the moment you have to witch between your "external" GPIOs in software an start the ADC measurement after the channel is setup. This is not a big deal if just a limited amount of sampling done, but if all pins are scanned each cycle it might generate unwanted software overhead. But in addition the ADCMUX has two direct connections to the OpAmp outputs. So, by switching your pins to the OpAmps, you can have the ADCMUX be hardware controlled and just wait for the results in your software.

kind regards,

Achim

0 Likes

Whoa, this is way more complicated than I expected and a bit disappointing I must say. PSoC is marketed THE micro controller of choice for analog applications but it seems like using more than 8 analog input reads in a cycle is not possible in a neat and simple way...

really really disappointing... I'll have to go back to Nordic semi I guess...

Thanks for your answer anyway

PS: It Seems that it is not possible yet with ModusToolbox but is it possible to configure P9 in PSoC Creator ?

0 Likes

Yes, just as AchimE_41 mentioned, it might not straightforward enough for Modus Toolbox to route non-dedicated pins to ADC block.

0 Likes