Dynamic Reconfiguration with PSoC | Cypress Semiconductor
Dynamic Reconfiguration with PSoC
Every programmable semiconductor device, including PSoC has limited resources. Cypress PSoC devices feature dynamic reconfiguration that enables designers to reuse analog and digital resources and achieve greater levels of functionality.
Interrupts and Dynamic Reconfiguration
Dynamic reconfiguration allows digital and analog blocks to be shared between different user modules, performing different functions at different times. This requires designers to handle interrupts differently from normal PSoC usage and choose the ISR to execute, based on which user module is loaded at any given time. For example, a digital block may share functionality between a Timer and SPI user module. Each of these UMs have a unique interrupt service routine, however, they share the same interrupt vector.
Therefore, the interrupt vector must be routed to the ISR for the user module that is loaded when the interrupt occurs. It is best to place user modules in such a way that the number of shared interrupt vectors is minimized.
The code excerpt below is taken from the interrupt vector table located in boot.asm file.
org 2Ch ;PSoC Block DCB03 Interrupt Vector
Normally this interrupt vector would have jumped to a routine with a name specific to the user module. The vector now jumps to a routine called Dispatch_INTERRUPT_11 instead of the user module s ISR. This interrupt handler consecutively checks each configuration that shares the block to determine the active one. When it finds the active configuration, it jumps to the appropriate ISR for the loaded user module. If many configurations share the same block, this function may take longer to execute. This also causes different interrupts to have different latencies.
For more information about setting up dynamic reconfiguration in PSoC along with an example project, please refer AN2104 Dynamic Reconfiguration using PSoC Designer.