Cypress CY7C65113C manual Processor Status and Control Register, Irq

Page 23

CY7C65113C

13.0Processor Status and Control Register

Processor Status and Control

 

 

 

 

 

Address 0xFF

Bit #

7

6

5

4

3

2

1

 

0

 

 

 

 

 

 

 

 

 

 

Bit Name

IRQ

Watchdog

USB Bus

Power-on

Suspend

Interrupt

Reserved

 

Run

 

Pending

Reset

Reset

Reset

 

Enable

 

 

 

 

 

 

Interrupt

 

 

Sense

 

 

 

Read/Write

R

R/W

R/W

R/W

R/W

R

R/W

 

R/W

 

 

 

 

 

 

 

 

 

 

Reset

0

0

0

1

0

0

0

 

1

 

 

 

 

 

 

 

 

 

 

Figure 13-1. Processor Status and Control Register

Bit 0: Run

This bit is manipulated by the HALT instruction. When Halt is executed, all the bits of the Processor Status and Control Register are cleared to 0. Since the run bit is cleared, the processor stops at the end of the current instruction. The processor remains halted until an appropriate reset occurs (power-on or Watchdog). This bit should normally be written as a ‘1.’

Bit 1: Reserved

Bit 1 is reserved and must be written as a zero. Bit 2: Interrupt Enable Sense

This bit indicates whether interrupts are enabled or disabled. Firmware has no direct control over this bit as writing a zero or one to this bit position has no effect on interrupts. A ‘0’ indicates that interrupts are masked off and a ‘1’ indicates that the interrupts are enabled. This bit is further gated with the bit settings of the Global Interrupt Enable Register (Figure 14-1) and USB End Point Interrupt Enable Register (Figure 14-2). Instructions DI, EI, and RETI manipulate the state of this bit.

Bit 3: Suspend

Writing a ‘1’ to the Suspend bit halts the processor and cause the microcontroller to enter the suspend mode that signifi- cantly reduces power consumption. A pending, enabled interrupt or USB bus activity causes the device to come out of suspend. After coming out of suspend, the device resumes firmware execution at the instruction following the IOWR which put the part into suspend. An IOWR attempting to put the part into suspend is ignored if USB bus activity is present. See Section 8.0 for more details on suspend mode operation.

Bit 4: Power-on Reset

The Power-on Reset is set to ‘1’ during a power-on reset. The firmware can check bits 4 and 6 in the reset handler to determine whether a reset was caused by a power-on condition or a Watchdog timeout. A POR event may be followed by a Watchdog reset before firmware begins executing, as explained below.

Bit 5: USB Bus Reset Interrupt

The USB Bus Reset Interrupt bit is set when the USB Bus Reset is detected on receiving a USB Bus Reset signal on the upstream port. The USB Bus Reset signal is a single-ended zero (SE0) that lasts from 12 to 16 s. An SE0 is defined as the condition in which both the D+ line and the D– line are LOW at the same time.

Bit 6: Watchdog Reset

The Watchdog Reset is set during a reset initiated by the Watchdog Timer. This indicates the Watchdog Timer went for more than tWATCH (8 ms minimum) between Watchdog clears. This can occur with a POR event, as noted below.

Bit 7: IRQ Pending

The IRQ pending, when set, indicates that one or more of the interrupts has been recognized as active. An interrupt remains pending until its interrupt enable bit is set (Figure 14-1, Figure 14-2) and interrupts are globally enabled. At that point, the internal interrupt handling sequence clears this bit until another interrupt is detected as pending.

During power-up, the Processor Status and Control Register is set to 00010001, which indicates a POR (bit 4 set) has occurred and no interrupts are pending (bit 7 clear). During the 96-ms suspend at start-up (explained in Section 7.1), a Watchdog Reset also occurs unless this suspend is aborted by an upstream SE0 before 8 ms. If a WDR occurs during the power-up suspend interval, firmware reads 01010001 from the Status and Control Register after power-up. Normally, the POR bit should be cleared so a subsequent WDR can be clearly identified. If an upstream bus reset is received before firmware examines this register, the Bus Reset bit may also be set.

During a Watchdog Reset, the Processor Status and Control Register is set to 01XX0001, which indicates a Watchdog Reset (bit 6 set) has occurred and no interrupts are pending (bit 7 clear). The Watchdog Reset does not effect the state of the POR and the Bus Reset Interrupt bits.

Document #: 38-08002 Rev. *D

Page 23 of 49

[+] Feedback

Image 23
Contents Cypress Semiconductor Corporation USB Hub with MicrocontrollerCY7C65113C 19.0 16.017.0 18.0List of Tables Features USB Functional OverviewGpio I2CLogic Block Diagram Top View CY7C65113C 28-pin Soic Pin ConfigurationsProduct Summary Tables Pin AssignmentsI/O Register Summary Operand Opcode Cycles Instruction Set SummaryInstruction Set Summary Mnemonic14-bit Program Counter Programming ModelKB -32 Prom ends here CY7C65113C Program Memory begins here8-bit Program Stack Pointer PSP 8-bit Accumulator a8-bit Temporary Register MOV A, Dspinit 8-bit Data Stack Pointer DSPAddress Modes Xtalin Power-on ResetClocking XtaloutWatchdog Reset Suspend ModePort 0 Data Address General-purpose I/O PortsPort 0,1 Low Isink Gpio Configuration Address Gpio Configuration PortPort 0 Interrupt Enable 10.0 12-bit Free-Running TimerGpio Interrupt Enable Ports 2C Configuration Address 11.0 I2C Configuration RegisterTimer LSB Address Timer MSB AddressACK 12.0 I2C-compatible ControllerI2C Data Address 2C Status and Control AddressContinue/Busy Write 1 to indicate ready for next transaction IRQ Processor Status and Control RegisterProcessor Status and Control Address 0xFF Interrupts Global Interrupt Enable Register AddressUSB Endpoint Interrupt Enable Address Interrupt Vectors Interrupt Controller Function DiagramInterrupt Latency USB Bus Reset InterruptTimer Interrupt 14.8 I2C Interrupt USB Endpoint InterruptsUSB Hub Interrupt Gpio InterruptACK/NAK/STALL USB OverviewUSB Serial Interface Engine SIE USB EnumerationHub Ports Connect Status Connecting/Disconnecting a USB DeviceUSB Hub Hub Downstream Ports Status and Control Hub Ports Enable Register AddressHub Ports Enable Register Enabling/Disabling a USB DeviceHub Ports SE0 Status Address 0x4F Hub Downstream Ports Control Register Address 0x4BHub Ports Force Low Hub Ports Suspend Address 0x4D Downstream Port Suspend and ResumeHub Ports Data Hub Ports Data RegisterUSB Status and Control Address 0x1F USB Upstream Port Status and ControlHub Ports Resume Address 0x4E USB Device Address Device A, B Addresses 0x10A and 0x40B USB Serial Interface Engine OperationUSB Device Addresses USB Device EndpointsSize Label Start Address USB Control Endpoint Mode RegistersUSB Device Endpoint Zero Mode A0, B0 Stall USB Non-control Endpoint Mode RegistersUSB Non-control Device Endpoint Mode USB Endpoint Counter RegistersUpdate Endpoint Mode/Count Registers Update and Locking MechanismSetup Data Set Update only if Fifo is WrittenData SetSetup OUT USB Mode TablesDtog Dval Count Dtog Dval Count Endpoint Ports Register SummaryLOW Absolute Maximum Ratings Sample SchematicUpstream/Downstream Port Electrical CharacteristicsParameter Description Conditions Min Max Unit General USB InterfaceParameter Description Min Max Unit Clock Source Switching Characteristics fOSC = 6.0 MHzUSB Full-speed Signaling10 Timer SignalsCY7C65113C-SXCT Package DiagramOrdering Information Ordering Code Prom Size Package Type Operating RangeREV ECN no Issue Date Orig. Description of ChangeDocument History