Looks You are the only specialist for these kind of problems related to PSOC4.
I've already waiting for response several days.
So could You explain me how to switch comparator input to digital output and drive sth from firmware if HSIOM reg is 0?
My pin is sourced from Clock. Why HSIOM is 0 again?
Could You extend Your project for such functionality, please?
You will help not only me, but also all guys from CYpress support team.
To make things more clear reg 0 means pin if driven from firmware ( in fact it's analog input).
When I change HSIOM to dig. out and back to analog it never goes back to analog anymore.
WHat should I change is HSIOM reg was 0 initially. And Port_0 ( where pin belongs to) is not set in cyfitter.cfg?
I extremely apologize for the delay.
If you would like to configure a pin to be muliplexed between analog input and a digital output, you must first enable both analog and digital terminals in the pin configuration dialog box. Any input to comparator has to be routed through AMUXBUS A or AMUXBUS B line and hence the HSIOM register value for that port pin should either be 0x6 or 0x7. If you would like to connect it as a digital output (firmware controlled), just change the HSIOm register value to be 0x0. Also please note that when you are switching a GPIO between different sources like this, it is highly recommended to tape out the Output Enable (OE) terminal of the "pin" component and connect it to logic 1.
If the default value of the comparator's input is appearing as 0x0, kindly let us know. Ideally it shouldn't happen.