FX3 Reset Register

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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!

0 Likes
8 Replies
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

   

Thanks in advance,

   

Markus

0 Likes
Anonymous
Not applicable

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

   

Regards,

   

Markus

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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?

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

0 Likes