29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

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.

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

RM0008<br />

Bit 3 Reserved<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 Clock<br />

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 <strong>and</strong> 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 <strong>and</strong> Host modes.<br />

Bit 0 CSRST: Core soft reset<br />

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

Clears the interrupts <strong>and</strong> 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, <strong>and</strong> all<br />

the transmit FIFOs <strong>and</strong> 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 bit<br />

<strong>and</strong> 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 <strong>and</strong> 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 <strong>and</strong> 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 <strong>and</strong> Host modes.<br />

730/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!