I configured PMODE pins to SPI flash boot mode but it is falling back to USB boot mode?

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

cross mob
RameshRajan
Level 2
Level 2
50 sign-ins First like received First solution authored

Hi,

I have configured PMODE to SPI flash boot mode in our custom board. But it is falling back to USB boot mode. 

I tried to ensure the state of PMODE pins as mentioned in this article. In my case, PMODE[2] is pull-down, PMODE[1]  is floated and PMODE[0] is pull-up with 10K resistor. According to FX3 datasheet(Table 8), the voltage from Vcc*0.9 is interpreted as HIGH and voltage till Vcc*0.1 is interpreted as LOW. For PMODE[2] and PMODE[1]  I got LOW(0) and Float(Z) respectively. But for PMODE[0] I'm getting float(Z) instead of getting HIGH(For SPI boot mode 0Z1). 

Here I would like ask two things

1. Am I correctly interpreting HIGH and LOW voltages?

2. How do I make PMODE[0] state as 1 ?

0 Likes
1 Solution
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

EDITTED

Hello,

Can you please elaborate what was meant by the following statement:

"I have configured PMODE to SPI flash boot mode in our custom board. But it is falling back to USB boot mode. "

Does it mean that the ROM bootloader interpreted the PMODE pins differently and fell back to USB boot or does it mean that your custom bootloader interpreted PMODE pins differently and fell back to USB boot? Please confirm which among the 2 possibilities is the actual issue.

Regarding your queries:

1. As mentioned in the KBA, See DC specifications of the datasheet to understand the range of voltages that are interpreted as HIGH / LOW corresponding to the power domain voltage of a particular I/O. You should be checking Input LOW and HIGH voltages. Also, PMODE pins are of VDDIO1 domain for CX3.

2. You just need to pull up the PMODE[0] pin using a 10k resistor to VDDIO1. This should make the pin HIGH.

Best Regards,
Jayakrishna

View solution in original post

0 Likes
9 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

EDITTED

Hello,

Can you please elaborate what was meant by the following statement:

"I have configured PMODE to SPI flash boot mode in our custom board. But it is falling back to USB boot mode. "

Does it mean that the ROM bootloader interpreted the PMODE pins differently and fell back to USB boot or does it mean that your custom bootloader interpreted PMODE pins differently and fell back to USB boot? Please confirm which among the 2 possibilities is the actual issue.

Regarding your queries:

1. As mentioned in the KBA, See DC specifications of the datasheet to understand the range of voltages that are interpreted as HIGH / LOW corresponding to the power domain voltage of a particular I/O. You should be checking Input LOW and HIGH voltages. Also, PMODE pins are of VDDIO1 domain for CX3.

2. You just need to pull up the PMODE[0] pin using a 10k resistor to VDDIO1. This should make the pin HIGH.

Best Regards,
Jayakrishna
0 Likes

Hi,

"Does it mean that the ROM bootloader interpreted the PMODE pins differently and fell back to USB boot or does it mean that your custom bootloader interpreted PMODE pins differently and fell back to USB boot? Please confirm which among the 2 possibilities is the actual issue".

Sorry I don't find any differences in these 2 possibilities but infact the  bootloader interpreted the PMODE pins differently and fell back to USB boot.

Thank you,

Abdul.

 

 

0 Likes

Hi Abdul,

Based on my understanding, you are doing the following on your custom board:

1. Programmed the SPI flash with the application firmware.

2. Changed the PMODE lines to 0Z1

3. Connected the board again to the PC

After the above steps were done, the device did not enumerate as a USB device that is defined by the descriptors written for the application firmware. Instead, the device enumerated as USB Bootloader device. Please let me know if my understanding is correct or not.

The second possibility that I mentioned in my previous response was to check if you wrote your own logic for your custom bootloader to check the status of the PMODE pins.

Best Regards,
Jayakrishna
0 Likes

Hi Jayakrishna,

"After the above steps were done, the device did not enumerate as a USB device that is defined by the descriptors written for the application firmware. Instead, the device enumerated as USB Bootloader device. Please let me know if my understanding is correct or not."

Yes you are correct. I also faced second possibility in my custom board.

Could you please tell me the reason for both of the possibilities?

One more thing I need to ask you is that, a custom board which is configured as SPI boot mode(No switching to other boot mode) must need to have a custom bootloader?

 

Thank you,

Abdul. 

0 Likes

Hi Abdul,

Let me first answer your following question:

"One more thing I need to ask you is that, a custom board which is configured as SPI boot mode(No switching to other boot mode) must need to have a custom bootloader"

>> FX3 has an internal ROM bootloader which is responsible for booting the application firmware into the RAM by checking the states of the PMODE lines. The ROM Bootloader will start running when the device is powered on. If your device has a custom bootloader, then the control is transferred to the custom bootloader from the ROM bootloader. If you configured the PMODE lines for SPI boot (PMODE[2:0] = 0Z1), then the ROM bootloader will look into the SPI flash to boot the application firmware into RAM. The bootloader starts looking from address 0 of the SPI flash. If the firmware is not as per FX3 Boot Image format mentioned in the document FX3_Programmers_Manual found in the following location:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware

Then the boot will fail and FX3 will fall back to USB boot i.e enumerate as a USB Bootloader device. 

There is no need to have a custom bootloader for a custom board. Depending on your application, you can choose to have it or not have it.

I'm still not clear about the actual problem. From the following statement in your initial description:
"But for PMODE[0] I'm getting float(Z) instead of getting HIGH(For SPI boot mode 0Z1)."

I understand that you were able to observe float on PMODE[0] instead of HIGH. If you were using the ROM Bootloader (the Bootloader that is a part of FX3's ROM for which you don't have any control), then how was this observed? Please confirm if you are testing with the ROM bootloader or your custom bootloader.

Best Regards,
Jayakrishna
0 Likes

Hi Jayakrishna,

Thank you for your reply. I am using ROM bootloader itself, I analyzed PMODE states as mentioned in this KBA. I think I was doing wrong. Thank you for letting me know.

My actual problem is:

I have done the following steps 

1.My custom board is in SPI boot mode as follows:

PMODE[2] -->Pull-down with R = 4.7K  (0) ;PMODE[1] -->Not connected DNP(Z) ;PMODE[0] -->Pull-up(1) with 10K resistor. I hope by this it is SPI boot mode.

2. I have written application firmware in SPI flash and verified the written image using Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspidmamode example -- total image is correctly written. By the way I have uploaded cyfxusbspidmamode example in RAM.

3. I have uploaded Fx3BootAppGcc by ( SPI boot enable , USB and I2C are disabled) in RAM. The ROM bootloader gone to SPI flash, downloaded into RAM and executed fine. By this process, I can confirm that my application firmware is getting stored in SPI flash perfectly and it is valid image.

Problem is that,

After writing application image in SPI flash it is falling back to USB as USB bootloader instead of behaving as device.

Without uploading Fx3BootAppGcc  it is fall back to USB as USB bootloader, it is not at all running the application firmware image which is written in SPI flash. 

As the PMODE pins are in SPI boot, ROM bootloader has to look into SPI flash and proceed further but it is not being done. 

Why it is falling back to USB though I have valid image in SPI flash?

By your previous response, ROM bootloader will look from address 0 of SPI flash. If it is being so my custom board would have run the application firmware. 

May I know what I am missing here?

How do I ensure that ROM bootloader is pointing to address 0 of SPI flash?

Help is most appreciated.

Thank you,

Abdul. 

 

0 Likes

Hi Abdul,

As mentioned under Table 9 of the Hardware checklists, you should be using 10k resistors externally for pull up and pull down on PMODE lines:
https://www.infineon.com/dgdl/Infineon-AN70707_EZ-USB_FX3_FX3S_SX3_hardware_design_guidelines_and_sc...

Please do not use 4.7K pull down on PMODE line. Also, please probe the PMODE lines using an oscilloscope and share the traces with us.

Regarding your following question:
"How do I ensure that ROM bootloader is pointing to address 0 of SPI flash?"

>> The bootloader will always check location 0 of the SPI flash if the boot mode is determined as SPI boot. Here, we suspect that the bootloader is not able to detect that the boot mode is SPI boot. 

Can you also share the part of schematics showing the connections of PMODE pins on your custom board?

Best Regards,
Jayakrishna
0 Likes

Hi Jayakrishna,

Please find the PMODE pins schematics below.

Abdul_2-1655201034811.png

 

Please let me know if any change is required.

Thank you,

Abdul.

0 Likes

Hello Abdul,

What is the value of Vcc? To which voltage rail have you pulled up PMODE[0]?

As mentioned before, use 10k resistors for pull up and pull down.

Best Regards,
Jayakrishna
0 Likes