How do I find the addresses of the registers associated with a Component in PSoC Creator?
You may need to determine the addresses of registers such as configuration registers, status registers, and data registers in cases such as when DMA is used for writing/reading to/from registers. The DMA Component requires the source/destination address details. Because PSoC Creator handles the placement and routing of the Components in the chip, the actual physical addresses of the associated Component registers are determined by PSoC Creator.
For example, if a “Control Register” Component is used in a project, PSoC Creator can place and route that Control Register in any of the 24 universal digital blocks (UDBs) available in the device. In addition, the UDB selection may change depending on further changes to the project schematic, pin assignments, and so on. All registers allocated to a Component are automatically included in the cyfitter.h file. This file can be used to access the Component registers in software without being affected by changes in Component placement.
For example, a Control Register named “Control_Reg_1” will have, among other things, the following definition in the cyfitter.h file.
#define Control_Reg_1__CONTROL_REG CYDEV_UWRK_UWRK8_B0_UDB10_CTL
Here, “CYDEV_UWRK_UWRK8_B0_UDB10_CTL” refers to the physical address of the control register in UDB. The software can use the “Control_Reg_1__CONTROL_REG” register definition to access the control register address.