Excellent question. Hopefully a Cypress expert can weight in on this.
I remember the PSoC 1 days where you can specify separate configurations and make a function call to load the new configuration.
I could not find that same feature here in Creator.
However, you can make run-time analog configuration calls at a very low level. I needed to do that on a recent project.
I used the Design-Wide Resource Analog editor. By hovering over the logical node connections, you can find the register to manipulate with the mask to use.
This requires substantial understanding of the PSoC's TRM and the registers to control the HW. The example below shows the node (in BLACK) that is found in ANAIF_RT_OPAMP3_SW and controlled with bit 0 (Mask: 0x1). Turn on or off that bit controls the node that enables or disables the switch.
AFAIK PSoC3-5 has no dynamic reconfiguration. You can, probably, upload different code by re-programming PSoC using othe MCU or bootloader (lets call it "static" reconfiguration)
A static configuration is assumed. That's what a compile/build is all about. A static configuration via bootload requires a master to dump the new configuration and it takes what could be precious time in the application which can make it impractical.
The trick is to provide a dynamic Analog or UDB runtime configuration method. This was allowed as a system call in the PSoC 1. There is no direct provision for this in the PSoC 3 and 5.
I was able to perform a limited version of this with directly modifying low-level control registers that change the analog component configuration and/or the signal routing mapping.
Did you solve OPAMP low input impedance problem? If so, can you upload a demo?
The code in CyFitter_cfg.c configures the device’s registers so that its resources behave as designed in the PSoC Creator project. This includes configuring the analog and digital resources, as well as system resources such as the clock tree and routing.
There is no official document or project for dynamically re-configuring the peripherals, but if you can log the CyFitter_cfg.c for one configuration and call the same instructions in another configuration. This will reconfigure the device. But this has to be tested. For analog peripherals this should work fine.
When it comes to UDB there are so many challenges involved. The datapath portion of the component can be configured with registers. But the PLD and routing cannot be. Routing involving DSI block which is generated with the help of PSoC creator will be difficult track and maintain between different versions. So this will be very difficult. I hope this answers your questions.
I'm not sure what OPAMP low-impedance problem to which you are referring.
What you are describing is very similar to how we used to do this on the PSoC 1.
My understanding of performing what you are suggesting has two caveats:
- Performing a full dynamic configuration change in one call will take xxx time since all the configurations are updated not a limited set.
- Performing a full dynamic config change my cause signals to "glitch" internally and externally to the PSoC. If this is acceptable to the application, it might be a option.
Actually only the registers related to a specific segment can be updated too. Normally creator will take care of everything related to routing and settings related to the component. You need to make sure that these are taken care. Regarding UDB dynamic reconfiguration might not be possible due to the complexity involved in routing.