PSoC® Creator™ Design with Pins Connected to More Than One Analog Mux Does Not Build – KBA219950

Version: **



Why does a design fail to route when several pins are connected to the inputs of more than one analog mux or to both halves of a differential analog mux?



This failure usually occurs because pin placements or other signals in the design require that the mux inputs must be routed over the two amuxbus halves (the two wires that run through every port). PSoC hardware permits a pin to connect to only one of these halves at a time. This means that there is no possible routing solution which would allow the design to function correctly if the same pin were selected as an input to both muxes at the same time. Therefore, the fitter fails to find a solution, and produces the error message apr.M0003: Unable to find a solution for the analog routing.

Note that this applies to the differential mux Component as well because it uses two independent single-ended muxes internally


If, in a particular design, it is known that both muxes will never select the same input pin at the same time, it is possible to work around this via manual register writes. The following assumes that there are two muxes in the design called AMux_1 and AMux_2.

  1. Wire up the pins to AMux_1, including its output pin, normal.
  2. Place the output pin for AMux_2 (but not the mux instance) on the schematic and configure it as a hardware-driven digital output. Hook up a logic high 1 to its digital input.
  3. Build the design.
  4. Look in the analog DWR and check whether the mux you placed on your schematic used amuxbusa (the outer "ring" wire) or amuxbusb (the inner one). Use the "lock route" option to keep this from changing when you modify your schematic.
  5. Write the HSIOM_PORT_SEL field for the AMux_2 output pin to connect it to the unused amuxbus half, that is, if AMux_1 used amuxbusa, set the value to 7 (AMUXB) and if AMux_1 used amuxbusb, set the value to 6 (AMUXA).

    When you want to connect a pin to AMux_1, use the APIs as normal.
    When you want to connect a pin to AMux_2, manually set the PORT_SEL field for that pin to match what you set for the AMux_2 output pin.
    To disconnect a pin from AMux_1, use the APIs as normal
    To disconnect a pin from AMux_2, manually set the PORT_SEL field for that pin to 0.
    Note that it is physically not possible to connect a pin to AMux_1 and AMux_2 at the same time. Connecting to AMux_2 will disconnect from AMux_1 and vice versa.