You have to check off the swap capability and enter the swap values.
Note you can do the switch in HW by enabling the switch input and feeding
it with a switch signal.
I want to use the API and by software modify the parameters.
CyGlobalIntEnable; /* Uncomment this line to enable global interrupts. */
Why is this simple code does not work?
Two questions -
1) Did you check the properties to allow the swap capability ?
2) Can you set a breakpoint and hit it on the swap instruction ?
Eg. are you getting into the if statement test on counter ?
3) Where do you reset counter variable after doing swap, otherwise
you will keep repeating the swap commands ?
You also have to have the compare checked.