1 Reply Latest reply on Dec 10, 2018 4:51 AM by alamandaa_16

    How to generate read address?




      By referencing SRAMMaster example, I've created a simple register read/write project.

      Please note, I've swapped write initial state name (START) with read initial state (RD_START), since don't know how to start the read flow.

      Like the example, I'm using AddressCounter as address source.

      It's "working", but start address is tied to 0.

      How can I set start address to any 32 bits value?

        • 1. Re: How to generate read address?

          Hello Dong Chen,


          --CyU3PGpifInitAddrCounter funtion is used in the firmware to configure the GPIF LD_ADDR_COUNT with the desired initial value, limit and counting mode.

          This API should be called after GPIFLoad and before GPIFStart in the Firmware.

          example : if you want to set start address to 10 and address limit to 255, you should set the initial value,limit and incerement value using following API.

          void CyU3PGpifInitAddrCounter ( uint32_t initValue, uint32_t limit, CyBool_t reload, CyBool_t upCount, uint8_t increment )

                             uint32_t initValue  = 0x0000000A

                             uint32_t limit         = 0x000000FF

                             CyBool_t reload    = CyTrue

                             CyBool_t upCount = CyTrue

                            uint8_t increment   = 0x01        


          Anil Srinivas.