Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 7/19/2024
Public
Document Table of Contents

5.6.6.2.1. Device Power-on or Soft Reset

The application must follow the initialization sequence for device mode operation. The order of programming is not that important, except for the first and last steps (DCTL/CSftRst=1 and DCTL.RunStop=1).

  • DCTL: Set the CSftRst field to ‘1’ and wait for a read to return ‘0’. This resets the device controller
  • GSBUSCFG0/1,GTXHRCFG/GRXTHRCFG: May leave reset values if application does not need to change
  • GSNPSID,GUID: Reading IDs/updating for device identification purpose
  • GUSB2PHYCFG: Program PHY setups
  • GUSB3PIPECTL: PIPE control properties
  • GTXFIFOSIZn,GRXFIFOSIZ0: Program Tx and Rx Buffer sizes
  • GEVNTADRn/GEVNTSIXn/GEVNTCOUNTn: Event buffers, sizes, and so on
  • GCTL: Override scaledown, and so on
  • DCFG: Device speed
  • DEVTEN: At a minimum, enable USB Reset, Connection Done, and USB/Link State Change Events.
  • DEPCMD0: Issue DEPSTARTCFG command with DEPCMD0.XferRscldx set to 0 and CmdlOC set to 0; Poll CmdAct for completion
  • DEPCMD0/DEPCMD1: Issue DEPCFG command for physical endpoints 0 & 1 and poll CmdAct for completion
  • DEPCMD0/DEPCMD1: Issue a DEPXFERCFG command for physical endpoints 0 and 1 with DEPCMDPAR0_0/1 and poll for CmdAct for completions

After the controller comes out of reset, wait for the following event:

  • Wait for a DEVT.USBReset event. It indicates that reset is detected in the system