ADC input selection through UDB | Cypress Semiconductor
ADC input selection through UDB
The manual says that the input sources of a SAR ADC can be set via registers or via the dedicated hardware signals. I can barely find the meaning of the register settings in the documentation (e.g. in SAR1_SW1 there is vp_ag7 Connect positive voltage input to analog global of same side), but how does it work in the case of UDB?
In SAR1_CSR1 there is swvp_src SAR positive input routing control source:
Value Name Description
1'b0 SAR_SWVP_SRC_REG ANAIF SAR routing registers
1'b1 SAR_SWVP_SRC_UDB UDB
Say I set it to SAR_SWVP_SRC_UDB. Then the cy_primitive SAR provides a 4-bit vp_ctl_udb input port and also a 4-bit vn_ctl_udb. But what is the meaning of the values encoded there? Let's say I want to connect vminus to VSSA by specifying a 4-bit value generated by UDB. What should the value be and how do you know it? I see nothing about it in the documentation.