Analog Routing Rules in PSoC® 4 BLE – KBA95947

Version: **


Question: What are the rules for analog routing in PSoC 4 BLE?



Analog blocks in PSoC 4 BLE have the following high-level routing rules and possibilities. Figure 1 shows the routing diagram and the analog blocks in the chip.

Figure 1: Analog Routing in PSoC 4 BLE

Analog Routing


PSoC 4 BLE has a Sequential SAR ADC block. The routing rules are as follows:

  1.   SAR-ADC inputs can be routed to one of the following:  
    •     External pins on Port 3
    •     AMUX-A / AMUX-B: these can be connected to multiple other blocks in the chip, including all port pins
    •     Opamp outputs (See the CTBm section)
    •     Temperature sensor
  2.   The routing can be controlled via the SAR Sequencer, Firmware, or DSI (UDB)
  3.   Routing inputs on Port 3:  
    1.     Single-ended channel inputs can be placed on any pin of Port 3
    3.     In case of only one differential channel, the inputs can be placed on any pin of Port 3
    5.     In case of multiple differential channels, the positive input must be on an even pin (0, 2, 4, 6), while the negative input must be on the consecutive odd pin (1, 3, 5, 7) of Port 3. Example, use P3.0/P3.1 for one channel and P3.4/P3.5 for the other channel.    

           This constraint is applicable when using the Sequencer to control routing. If this routing is not followed, the SAR Sequencer tries to use the AMUX to place the Component. In firmware-controlled or DSI-controlled routing, this constraint is not present.

    7.     In case of multiple single-ended channels and one of them being on P3.4, the GPIO P2.4 cannot be routed to any of the AMUX buses.
    9.     In case of multiple differential-ended channels and one of them being on P3.4/P3.5, the GPIOs P2.1 and P2.4 cannot be routed to any of the AMUX buses.
  4.   If the channel input is on a port other than Port 3, AMUX-A/B buses are used to route the input to that pin. Here, two singleended channels or one differential channel can be used.
  5.   If an external reference is used, the VREF pin of the chip is available, and no port pins can be used for the same.

CTBm (Opamp)

PSoC 4 BLE has two CTBm blocks. Each CTBm has two Opamps (Opamp0 and Opamp1), the routing for which is detailed below:

  1.   Positive terminal: For each Opamp, the positive terminal can connect to one of two fixed GPIOs, or one of the two AMUX buses.  

       For Opamp0, the input can connect to Pin 0 or Pin 6 of the corresponding port, or to AMUX-A.


       For Opamp1, the input can connect to Pin 5 or Pin 7 of the corresponding port, or to AMUX-B.

  2.   Negative terminal – For each Opamp, the negative terminal can connect either to a fixed GPIO, or to the output of the Opamp.  

       For Opamp0, the GPIO is Pin 1 of the corresponding port.


       For Opamp1, the GPIO is Pin 4 of the corresponding port.

  3.   Output terminal: The Opamp output terminal can connect either to a GPIO, or to the SAR-ADC through the SARBUS.  

       For Opamp0, the output can connect to Pin 2 of the corresponding port, or to SARBUS0.


       For Opamp1, the output can connect to Pin 3 of the corresponding port, or to SARBUS0 or SARBUS1.

CTBm0 is associated with Port 2, while CTBm1 is associated with Port 1.


The CapSense block can connect to any GPIO via AMUX buses. Also, the IDAC blocks in CapSense can be connected to the AMUX bus, which can then connect to a GPIO or Opamp.

CapSense CMOD and CSH_TANK pins are connected to P4[0] and P4[1] respectively, and if any other pins have to be used for this purpose, then AMUX buses must be used to connect to those GPIOs.

Low-Power Comparator

There are two low-power comparators (LPCOMP0, LPCOMP1) in the chip. Their routing is as follows:

  1.   Input:  

       LPCOMP0 input terminals are P0[0] for positive and P0[1] for negative input


       LPCOMP1 input terminals are P0[4] for positive and P0[5] for negative input.

  2.   Output:  

       LPCOMP output toggle (edge) can trigger an interrupt, which can be used to detect a signal change.


       LPCOMP output can also be routed to a GPIO or other blocks of the chip via DSI.

For more details on the analog routing, refer to the PSoC 4 BLE Architecture TRM.