According to my understanding, you want to guarantee that you do not reconfigure the mux channels that are already used. Will you be using the Top Design in your project or is the entire hardware initialized through the code?
As you are using a PSoC 6 device, it is easier to use the Hardware Abstraction Layer (HAL) provided with ModusToolbox. HAL internally maintains a record of the resources used so that the user need not worry about it.
Rakshith M B
Thanks for the response, your understanding is exactly correct.
Right now I'm using the Top Design for part of the project and then initializing the rest in code (within a different IDE). Basically the M0p code is built in PSoC Creator (using a Top Design) but the M4 code is developed outside of PSoC creator and then the two elf files are linked. It all works quite well with the exception of keeping track of used resources. I haven't used ModusToolbox at all yet and was trying to avoid having to migrate to that right now, I've been referencing the PDL for the code development required on the M4.
The M0p code is fairly static so once its developed it shouldn't change much, my solution is a little hacky but acceptable in that thus far, for the TCPWM I've just been checking what timer blocks the M0p is using (this info is in cyfitter.h) and making sure they were reserved on the M4. I can't figure out where to find that info for the TrigMux though.
2 of 2 people found this helpful
As the CM0p and CM4 projects are completely unrelated, there might not be a way to confirm that there will not be any conflict in the allocation of hardware resources. The best way is to assign the right hardware resource in each project and debug the project to see if there are any conflicts. For assigning the Trig Mux group please refer to Figure 23-4. PSoC 6 MCU Trigger Multiplexer Block Architecture in PSoC 6 MCU Architecture TRM, Page 229.
You can also try assigning interrupts to the hardware block used and then change the state of the pins in the interrupt handlers.
Hope this helps,
Thanks and Regards,
Rakshith M B