1 of 1 people found this helpful
CY_SET_REG32(CYREG_SAR_CTRL, (CY_GET_REG32(CYREG_SAR_CTRL) & 0xFFFFFF0F) | 0x00000050);
You can check the 15.1.1 SAR CTRL register section in the register TRM http://www.cypress.com/file/136296/download
Thank you VRS for your answer.
I applied your solution and it works but I can use it only if I don't have the ByPass Cap, and the TopDesign is configured with External Vref so than I can place the External VRef pin.
Now my problem is to use both "VDDA/2 with Bypass Cap" and "External VRef".
The problem is to configure on the TopDesign both the pins for ByPass Cap and the Externa VRef.
If I set the TopDesign with "VDDA/2 bypassed" I can place only the BypassCap pin
If I set the TopDesign with "External VRef" I can place only the External VRef pin
I don't know how to do this.
Unfortunately as per design the same pins is used for external vref and and bypass capacitor. Now if you have not used your amux bus for any purpose( as an amux component / due to routing constrains or for components like capsense) you may be able to use two different pins for this purpose. You can connect two pins in firmware in using the amux bus.
Please see the attached image. In CYDWR -> Analog , you can see the switches and their respective register address. You can make use of SET_REG32 API.
There are draw backs to this step as there are switch resistances of 150ohm per each switch. Could you please try this method and see if it works.
at the moment I think to keep the configuration without the ByPass Cap.
Thank you and Best Regards.