8 Replies Latest reply on Jun 12, 2012 7:00 AM by userc_43610

    FX3 Reset Register

      All -




      For the FX2, in order to drop the device into reset, you would issue the command 0xAO and write to the register 0xE600. What is the equivalent command / register combo to drop the FX3 into reset?





        • 1. Re: FX3 Reset Register

          It does not have the reset register kind of operation for firmware download.


          We've the jump to program entry vendor request for this. It is 0xA0 vendor request with wValue (LSW) and wIndex (MSW) containing the address of the 4-byte program entry address.





          • 2. Re: FX3 Reset Register

            I suppose this offset address does not change. Can you please post the values in question?


            Thanks in advance,



            • 3. Re: FX3 Reset Register

              In the FX3 programmers manual, p. 131, I see 0x40000000. Is this correct?





              • 4. Re: FX3 Reset Register

                Markus -

                The address does move around depending on where CyU3PFirmwareEntry() gets placed during linking. The "FX3 Boot Image Format" section of the FX3 Programmer's Manual describes where the start address may be found in a .img file, or you can use arm-none-eabi-objdump on the ELF file or look it up in a map file. Probably you could also set up a custom linker script to force CyU3PFirmwareEntry to be placed at a particular address.


                • 5. Re: FX3 Reset Register

                  Reading the next to last DWORD of the firmware file seems to be the easiest way to go. I suppose this is what you meant.



                  • 6. Re: FX3 Reset Register

                    Well, there remains the case where I don't have the firmware file at hand, but still need to reset the FX3 in software before I can upload new firmware. Which approach do you suggest in such a setting?

                    • 7. Re: FX3 Reset Register

                      In that case I think the only option is to build the firmware so that its start address is constant. There may be an elegant way to do that with only a linker script; if so, I don't know it. What you can do is add an assembly file (call it "Start.S") to your Eclipse project:

                      .section .text
                      .code 32

                      .global start
                      b CyU3PFirmwareEntry



                      Then, use a custom linker script. You can clone the one in the FX3 SDK firmware/common folder into your project.
                      Delete this line:




                      And, modify the file so that it reads like this:

                      . = 0x40003000;
                      .text :
                         /* Nail down the start address */

                      You'll also need to modify the linker options to remove the " -Wl,--entry,CyU3PFirmwareEntry" from the ld command line. Then, your start address should always be 0x40003000.

                      Hope this helps,

                      • 8. Re: FX3 Reset Register

                        Hi Steve,


                        thanks for your reply. The first thing I thought of was reading the current firmware file from memory and jump the dLength fields until I hit dLength N (which should be zero). The Program Entry is immediately afterwards then.