Cypress CY7C63310, CY7C638xx manual Interrupt Registers, Interrupt Clear 0 INTCLR0 0xDA R/W

Page 52

CY7C63310, CY7C638xx

17.5 Interrupt Registers

The Interrupt Clear Registers (INT_CLRx) are used to enable the individual interrupt sources’ ability to clear posted interrupts.

When an INT_CLRx register is read, any bits that are set indicates an interrupt has been posted for that hardware resource. Therefore, reading these registers gives the user the ability to determine all posted interrupts.

Table 17-2. Interrupt Clear 0 (INT_CLR0) [0xDA] [R/W]

Bit #

7

6

5

4

3

2

1

0

Field

GPIO Port 1

Sleep Timer

INT1

GPIO Port 0

SPI Receive

SPI Transmit

INT0

POR/LVD

Read/Write

R/W

R/W

R/W

R/W

R/W

R/W

R/W

R/W

Default

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

When reading this register,

0 = There is no posted interrupt for the corresponding hardware 1 = Posted interrupt for the corresponding hardware present

Writing a ‘0’ to the bits clears the posted interrupts for the corresponding hardware. Writing a ‘1’ to the bits AND to the ENSWINT (Bit 7 of the INT_MSK3 Register) posts the corresponding hardware interrupt.

Table 17-3. Interrupt Clear 1 (INT_CLR1) [0xDB] [R/W]

Bit #

7

6

5

4

3

2

1

0

Field

TCAP0

Prog Interval

1-ms Timer

USB Active

USB Reset

USB EP2

USB EP1

USB EP0

 

 

Timer

 

 

 

 

 

 

Read/Write

R/W

R/W

R/W

R/W

R/W

R/W

R/W

R/W

Default

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

When reading this register,

0 = There is no posted interrupt for the corresponding hardware.

1 = Posted interrupt for the corresponding hardware present.

Writing a ‘0’ to the bits clears the posted interrupts for the corresponding hardware. Writing a ‘1’ to the bits and to the ENSWINT (Bit 7 of the INT_MSK3 Register) posts the corresponding hardware interrupt.

Table 17-4.

Interrupt Clear 2 (INT_CLR2) [0xDC] [R/W]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bit #

 

7

6

5

 

4

3

2

1

0

Field

 

Reserved

Reserved

GPIO Port 3

 

GPIO Port 2

PS/2 Data Low

INT2

16-bit Counter

TCAP1

 

 

 

 

 

 

 

 

 

Wrap

 

Read/Write

 

R/W

R/W

R/W

 

R/W

R/W

R/W

R/W

R/W

Default

 

0

0

0

 

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

When reading this register,

0 = There is no posted interrupt for the corresponding hardware.

1 = Posted interrupt for the corresponding hardware present.

Writing a ‘0’ to the bits clears the posted interrupts for the corresponding hardware. Writing a ‘1’ to the bits AND to the ENSWINT (Bit 7 of the INT_MSK3 Register) posts the corresponding hardware interrupt.

17.5.1 Interrupt Mask Registers

The Interrupt Mask Registers (INT_MSKx) enable the individual interrupt sources’ ability to create pending interrupts.

There are four Interrupt Mask Registers (INT_MSK0, INT_MSK1, INT_MSK2, and INT_MSK3) which may be referred to in general as INT_MSKx. If cleared, each bit in an INT_MSKx register prevents a posted interrupt from becoming a pending interrupt (input to the priority encoder). However, an interrupt can still post even if its mask bit is zero. All INT_MSKx bits are independent of all other INT_MSKx bits.

If an INT_MSKx bit is set, the interrupt source associated with that mask bit may generate an interrupt that becomes a pending interrupt.

The Enable Software Interrupt (ENSWINT) bit in INT_MSK3[7] determines the way an individual bit value written to an INT_CLRx register is interpreted. When it is cleared, writing 1's to an INT_CLRx register has no effect. However, writing 0's to an INT_CLRx register, when ENSWINT is cleared, causes the corresponding interrupt to clear. If the ENSWINT bit is set, any 0s written to the INT_CLRx registers are ignored. However, 1s written to an INT_CLRx register, when ENSWINT is set, causes an interrupt to post for the corresponding interrupt.

Software interrupts can aid in debugging interrupt service routines by eliminating the need to create system level interac- tions that are sometimes necessary to create a hardware only interrupt.

Document 38-08035 Rev. *K

Page 52 of 83

[+] Feedback

Image 52
Contents Features ApplicationsCypress Semiconductor Corporation 198 Champion Court San Jose, CA Document 38-08035 Rev. *K Revised December 08Logic Block Diagram GpioIntroduction ConventionsPinouts Die Pad Summary Pad Number Pad Name Microns Gpio Port 1 bit 0/USB D+ 1 If this pin is used as a Pin DescriptionGpio Port 1 bit 1/USB D- 1 If this pin is used as a CPU Architecture No connectSupply GroundCPU Registers Flags RegisterAddressing Modes Source Direct Opcode Operand Source Indexed Opcode Operand10. Destination Direct Opcode Operand Destination Indexed12. Destination Direct Source Immediate Opcode Operand 13. Destination Indexed Source Immediate Opcode Operand14. Destination Direct Source Direct Opcode Operand 15. Source Indirect Post Increment Opcode OperandInstruction Set Summary Instruction Set Summary Sorted Numerically by Opcode Order2Memory Organization Flash Program Memory OrganizationPOR/LVD INT0 EP0 EP1 EP2Data Memory Organization FlashSrom Stack begins here and grows upwardSrom Function Descriptions Srom Function Parameters Variable Name Sram AddressSrom Return Codes Description ReadBlock Parameters Name Address DescriptionProtection Modes Settings Description Marketing WriteBlock Parameters Name Address DescriptionEraseBlock Parameters Name Address Description Block Block nProtectBlock Parameters Name Address Description EraseAll Parameters Name Address Description10. Table Read Parameters Name Address Description 11. Return values for Table Read Table Number Return ValueSrom Table Checksum Function Clocking12. Checksum Parameters Name Address Description Clock Block Diagram Iosc Trim Iosctr 0x34 R/W Clock Architecture DescriptionBit 40 Gain Lposc Trim Lposctr 0x36 R/W CPU/USB Clock Config Cpuclkcr 0x30 R/WBit 41 Reserved OSC Control 0 OSCCR0 0x1E0 R/W Bit 76 Reserved Bit 5 No BuzzUSB Osclock Clock Configuration Osclckcr 0x39 R/W Timer Clock Config Tmrclkcr 0x31 R/WBit 72 Reserved = TcapclkTimer Capture Clock Tcapclk Interval Timer Clock ItmrclkCou nte r Terru pt Ntro ller Document 38-08035 Rev. *K CPU Clock During Sleep Mode Clock IO Config Clkiocr 0x32 R/WReset Sleep Mode Power on ResetWatchdog Timer Reset Reset Watchdog Timer Reswdt 0xE3 WSleep Sequence Wake up SequenceLow Power in Sleep Mode Wake Up TimingLow Voltage Detect Control Low Voltage Control Register Lvdcr 0x1E3 R/WBit 76 Reserved Bit 54 PORLEV10 Bit 20 VM20 LVD Trip Point V Min Point V Typ Point V MaxVoltage Monitor Comparators Register Vltcmp 0x1E4 R Bit 72 Reserved Bit 1 LVDECO Trim Register ECO Ecotr 0x1EB R/WPort Data Registers General Purpose IO Gpio PortsP0 Data Register P0DATA0x00 R/W P2 Data Register P2DATA 0x02 R/W P1 Data Register P1DATA 0x01 R/WP3 Data Register P3DATA 0x03 R/W Gpio Port Configuration P0.0/CLKIN Configuration P00CR 0x05 R/W P0.1/CLKOUT Configuration P01CR 0x06 R/WP0.2/INT0-P0.4/INT2 Configuration P02CR-P04CR 0x07-0x09 R/W P0.5/TIO0 P0.6/TIO1 Configuration P05CR-P06CR 0x0A-0x0B R/WP0.7 Configuration P07CR 0x0C R/W 10. P1.0/D+ Configuration P10CR 0x0D R/W11. P1.1/D- Configuration P11CR 0x0E R/W 12. P1.2 Configuration P12CR 0x0F R/W13. P1.3 Configuration P13CR 0x10 R/W 14. P1.4-P1.6 Configuration P14CR-P16CR 0x11-0x13 R/W15. P1.7 Configuration P17CR 0x14 R/W 16. P2 Configuration P2CR 0x15 R/W17. P3 Configuration P3CR 0x16 R/W Serial Peripheral Interface SPISPI Data Register SPI Data Register Spidata 0x3C R/WSPI Configure Register SPI Mode Timing vs. LSB First, Cpol and Cpha SPI Interface PinsSclk Ssel DAT a Timer Registers Free Running Timer Low order Byte Frtmrl 0x20 R/WFree Running Timer High-order Byte Frtmrh 0x21 R/W RegistersTimer Capture 0 Rising TIO0R 0x22 R/W Timer Capture 1 Rising TIO1R 0x23 R/WTimer Capture 0 Falling TIO0F 0x24 R/W Timer Capture 1 Falling TIO1F 0x25 R/WProgrammable Interval Timer High Pitmrh 0x27 R Bit 74 ReservedProgrammable Interval Reload Low Pirl 0x28 R/W 10. Programmable Interval Reload High Pirh 0x29 R/W11. Timer Configuration Tmrcr 0x2A R/W Timer CaptureBit 20 Reserved 12. Capture Interrupt Enable Tcapinte 0x2B R/W 13. Capture Interrupt Status Tcapints 0x2C R/WTimer Functional Sequence Diagram Bit Free Running Counter Loading Timing Diagram Interrupt Controller Architectural DescriptionInterrupt Processing Interrupt Trigger ConditionsInterrupt Latency PCH PC158 is cleared to zeroInterrupt Registers Interrupt Clear 0 INTCLR0 0xDA R/WInterrupt Clear 1 INTCLR1 0xDB R/W Interrupt Clear 2 INTCLR2 0xDC R/WInterrupt Mask 3 INTMSK3 0xDE R/W Bit 7 Enable Software Interrupt EnswintBit 60 Reserved Interrupt Mask 2 INTMSK2 0xDF R/W Interrupt Mask 1 INTMSK1 0xE1 R/W Interrupt Mask 0 INTMSK0 0xE0 R/W Interrupt Vector Clear Register Intvc 0xE2 R/WVreg Control Regulator OutputVreg Control Register Vregcr 0x73 R/W USB Transceiver Configuration USB Transceiver Configure Register Usbxcr 0x74 R/WUSB/PS2 Transceiver USB Serial Interface Engine SIEUSB Device USB Device AddressEndpoint 0, 1, and 2 Count USB Device Address Usbcr 0x40 R/WEndpoint 0 Mode EP0MODE 0x44 R/W Endpoint 0 ModeBit 30 Mode Endpoint 1 and 2 Mode Endpoint 1 and 2 Mode EP1MODE EP2MODE 0x45, 0x46 R/WBit 7 Stall Endpoint 0 Data EP0DATA 0x50-0x57 R/WUSB Mode Tables Mode ColumnEncoding Column Endpoint 2 Data EP2DATA 0x60-0x67 R/WDetails of Mode for Differing Traffic Conditions SETUP, IN, and OUT ColumnsCount Fifo Addr Name Default Register SummaryTmrcr Intvc Voltage Vs CPU Frequency Characteristics Voltage vs CPU Frequency CharacteristicsDC Characteristics Absolute Maximum RatingsDetect 3V RegulatorAC Characteristics General Purpose IO InterfaceParameter Description Conditions Min Typical Max Unit Clock CpuclkUSB Data Timing Non-USB Mode Driver CharacteristicsSPI Timing Gpio Timing Diagram Clock TimingDifferential Data Lines SCK CPOL=0 SCK CPOL=0 SCK CPOL=1 Ordering Information Package HandlingPackage Diagrams Pin 300-Mil Molded DIP P1Pin 300-Mil Molded DIP P3 Pin 300-Mil Soic S13 Pin QFN Package Document History Added block diagrams and timing diagrams Updated part numbers in the headerRemoved 638xx die diagram and die form pad assignment Removed Gpio port 4 configuration detailsVGT/AESA CMCC/PYRSWorldwide Sales and Design Support Products PSoC Solutions Sales, Solutions, and Legal InformationUSB