09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>RM0090</strong> USB on-the-go full-speed (OTG_FS)<br />

Bit 2 FCRST: Host frame counter reset<br />

The application writes this bit to reset the frame number counter inside the core. When the<br />

frame counter is reset, the subsequent SOF sent out by the core has a frame number of 0.<br />

Note: Only accessible in host mode.<br />

Bit 1 HSRST: HCLK soft reset<br />

The application uses this bit to flush the control logic in the AHB Clock domain. Only AHB<br />

Clock Domain pipelines are reset.<br />

FIFOs are not flushed with this bit.<br />

All state machines in the AHB clock domain are reset to the Idle state after terminating the<br />

transactions on the AHB, following the protocol.<br />

CSR control bits used by the AHB clock domain state machines are cleared.<br />

To clear this interrupt, status mask bits that control the interrupt status and are generated by<br />

the AHB clock domain state machine are cleared.<br />

Because interrupt status bits are not cleared, the application can get the status of any core<br />

events that occurred after it set this bit.<br />

This is a self-clearing bit that the core clears after all necessary logic is reset in the core. This<br />

can take several clocks, depending on the core’s current state.<br />

Note: Accessible in both device and host modes.<br />

Bit 0 CSRST: Core soft reset<br />

Resets the HCLK and PCLK domains as follows:<br />

Clears the interrupts and all the CSR register bits except for the following bits:<br />

– RSTPDMODL bit in OTG_FS_PCGCCTL<br />

– GAYEHCLK bit in OTG_FS_PCGCCTL<br />

– PWRCLMP bit in OTG_FS_PCGCCTL<br />

– STPPCLK bit in OTG_FS_PCGCCTL<br />

– FSLSPCS bit in OTG_FS_HCFG<br />

– DSPD bit in OTG_FS_DCFG<br />

All module state machines (except for the AHB slave unit) are reset to the Idle state, and all<br />

the transmit FIFOs and the receive FIFO are flushed.<br />

Any transactions on the AHB Master are terminated as soon as possible, after completing the<br />

last data phase of an AHB transfer. Any transactions on the USB are terminated immediately.<br />

The application can write to this bit any time it wants to reset the core. This is a self-clearing<br />

bit and the core clears this bit after all the necessary logic is reset in the core, which can take<br />

several clocks, depending on the current state of the core. Once this bit has been cleared, the<br />

software must wait at least 3 PHY clocks before accessing the PHY domain (synchronization<br />

delay). The software must also check that bit 31 in this register is set to 1 (AHB Master is Idle)<br />

before starting any operation.<br />

Typically, the software reset is used during software development and also when you<br />

dynamically change the PHY selection bits in the above listed USB configuration registers.<br />

When you change the PHY, the corresponding clock for the PHY is selected and used in the<br />

PHY domain. Once a new clock is selected, the PHY domain has to be reset for proper<br />

operation.<br />

Note: Accessible in both device and host modes.<br />

Doc ID 018909 Rev 3 1054/1416

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!