Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > FX3 Reset Register

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



FX3 Reset Register
Moderator:
RSKV

Post Reply
Follow this topic



FX3 Reset Register

wglados posted on 08 Sep 2011 12:53 PM PST
Top Contributor
23 Forum Posts

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?

 

Thanks!




Re: FX3 Reset Register

aasi posted on 13 Sep 2011 04:41 AM PST
Cypress Employee
1073 Forum Posts

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.

Regards,

Anand



Re: FX3 Reset Register

MarSch posted on 05 Jun 2012 05:31 AM PST
Senior Member
17 Forum Posts

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

Thanks in advance,

Markus



Re: FX3 Reset Register

MarSch posted on 05 Jun 2012 05:54 AM PST
Senior Member
17 Forum Posts

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

Regards,

Markus



Re: FX3 Reset Register

AssemblyRequired posted on 05 Jun 2012 07:58 AM PST
Top Contributor
37 Forum Posts

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.

Steve



Re: FX3 Reset Register

MarSch posted on 11 Jun 2012 02:10 AM PST
Senior Member
17 Forum Posts

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.

/M



Re: FX3 Reset Register

MarSch posted on 11 Jun 2012 02:54 AM PST
Senior Member
17 Forum Posts

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?



Re: FX3 Reset Register

AssemblyRequired posted on 11 Jun 2012 06:23 AM PST
Top Contributor
37 Forum Posts

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
start:
b CyU3PFirmwareEntry

.end

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

ENTRY(CyU3PFirmwareEntry);
 

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

. = 0x40003000;
.text :
{
  *Start.o(.text)
   /* Nail down the start address */
  *(.text)
...

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,
Steve



Re: FX3 Reset Register

MarSch posted on 12 Jun 2012 05:00 AM PST
Senior Member
17 Forum Posts

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.

Regards,

Markus






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.