- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a product which uses PSoC 1 which uses firmware to dynamically select 2 of many different GPIO ports to be inputs to a quadrature decoder.
This does not appear to be possible on PSoC 4. I tried looking at how the generated CYfitter.C file changes for various different ports routed to the inputs and there is no rhyme or reason behind it at all. There is a list of registers which change in what appears to be a random fashion, many of which are undocumented. The counter block which houses the decoder does have input control registers which are documented but just states bits which control "one of 16 possible inputs" which is not very helpful. The documentation mentions UDB, HSIOM and other terms but fails to documents them fully.
Does all of this mean that dynamically changing routing of GPIOs to digital blocks is not possible in Creator?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may use some digital MUXes to connect your inputs to the Quad-decoder.
When the selection of the pins is static (depending on the machine connected to) you may use a virtual MUX.
Routing pins to components can be done by setting the appropriate registers, but I would not do that (shudder).
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The PRoC BLE I am using doesnt contain any Muxes unfortunately.
So I will need to switch to PSoC BLE or do it a different way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I looked at Register TRM, looks like even register based routing very limited
to AMUX buss selection.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually analog mux bus register routing on PRoC or PSoC is not a problem. The "analog" view on both shows the registers involved. There is simply a register setting to connect each bit to the bus or not. The two busses are split into two sections and there are 2 settings which need to be made to join both sections together. PRoC doesnt allow you to place an analog mux on the schematic but that doesnt really matter as its not necessary, it still shows it in the analog view. PSoC does allow placement and generates code for connecting each port to the mux, but the code it generates is pretty inefficient as it disconnects and reconnects the bus split for each bit and simply uses a "case" statement with code for each port rather than calculating the registers to be changed.
The problem comes with digital routing. The configuration is not repeatable, if you change one setting a whole lot of registers change. There are no clearly defined routing paths which can be enabled/disabled as on PSoC 1. I had thought it would be possible to switch between 2 or 3 configurations by saving the config in the Cyfitter.C file each time after manually configuring, but even this doesnt appear to work. I have not pursued this any further.