cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

DaLi_3097136
New Contributor II

Hi all,

I have an issue with FX3 booting from SPI flash. We have a custom design that supports booting from both USB and SPI. We have a jumper circuit that configure PMODE so that with jumper on, FX3 boots from USB, otherwise it boots from SPI. We have tested that booting from USB works with the jumper on. We also confirmed USB Control Center can successfully program SPI flash. Meanwhile I saw the activities on SPI bus. This verifies the connection from FX3 to SPI flash is good.

But with jumper off, it doesn't boot from SPI, after pressing reset button. In fact, I saw no SPI activity on the scope, so it doesn't even try to boot from SPI. Below is what I did to troubleshoot:

     -  checked the PMODE[2:0] to be "0F1", as expected. Voltmeter reads 0 and 1.8V for PMODE[2] and PMODE[0]. PMODE[1] reads 0V but has large impedance to ground. So I believe PMODE[1] is floating.

     -  probe the SPI SCK/CS signals on scope after pressing reset button (works for USB boot), no SPI activity was seen.

     -  checked that all voltage supplies are correct: VIO[1-5]=1.8V, CVDDQ=1.8V, VDD=1.2V, VBATT=3.3V

     -  checked that 19.2MHz clock is good.

Any idea where I might be missing? Thank you in advance.

Best,

Dawei

0 Likes
1 Solution
DaLi_3097136
New Contributor II

Okay. Finally the truth is revealed. Thanks for those who had tried to help. Hope the following summary could help other designers.

Issue:      1) FX3 has no SPI activity at bootloader stage, when booting from SPI (PMODE[2:0]=0b'0F1)

                2) FX3 boots fine from USB (PMODE[2:0]=0b'F11)

Cause:      PMODE[0] pullup resistor is too weak (100K, in our case), that for some reason, FX3 treats it as high impedance, even though voltage reads high (1.8V).

Explanation:

               1) FX3 has no SPI activity when configured for it, because PMODE is essentially 0b'0FF, which is not defined.

               2) FX3 boots fine from USB because the resulting PMODE[2:0 is 0b'F1F, which happens to be I2C boot, and upon failure it falls back to USB. In this mode, I2C traffic was observed on the scope before the USB fallback. So I was fooled by the fact it ends up booting from USB.

Solution: replace PMODE[0] pullup resistor with 10K or smaller.

Comment: The requirement of resistor for PMODE configuration is not mentioned in FX3 datasheet or design guideline (AN70707). The closest description is on page 14 of AN70707 as below, where it recommends 10K but doesn't explicitly state allowable range.

We recommend adding pull-up and pull-down options (using 10 KΩ) on the PMODE[2:0] signals and load the

combination needed for preferred booting option. This will give the flexibility to debug the system during early

development.

View solution in original post

0 Likes
17 Replies
SrinathS_16
Moderator
Moderator

Hello Dawei,

Please let me know the SPI flash that you are using. Also, kindly, check if the SPI flash used is in accordance with the specifications mentioned in the below document.

Best regards,

Srinath S

0 Likes
DaLi_3097136
New Contributor II

Hi Srinath,

We use Winbond W25Q40EWUXIE as the SPI flash. But I don't think the flash or how to use it is the problem. As I stated earlier, 1) this flash was programmed successfully in USB control center. Meanwhile, SPI activity was seen on oscilloscope during programming. 2) When booting from SPI, there was even no SPI clock signal coming out of FX3, as if it is not even trying to boot from SPI. This is independent of what flash is used.

Best,

Dawei

0 Likes
alamandaa_16
Moderator
Moderator

Hi,

Please share the schematic of PMODE Lines.

Regards,

Anil Srinivas.

0 Likes
DaLi_3097136
New Contributor II

pmode.png

--------------------------------------------

flash.png

0 Likes
DaLi_3097136
New Contributor II

Hi Anil,

Please let me know if you find anything wrong with our schematic.

FYI - Today we tried forcing PMODE to be 0b'0F1 in order to take the dual analog switch IC out of equation, however, that didn't make a difference either. That was also true with 10K pulldown on MISO line.

Thanks,

Dawei

0 Likes
SrinathS_16
Moderator
Moderator

Hello Dawei,

- Please share the IMG file that you have used to program the SPI flash.

- Do you see the FX3 device falling back to USB Boot mode after the SPI fails?

- Also, try removing the series resistor on the MISO line.

Best regards,

Srinath S

0 Likes
DaLi_3097136
New Contributor II

Hello Srinath,

1) the image is attached. However, I still think it is not related to SPI flash or what image being programmed, but the ROM bootloader in FX3 doesn't boot from SPI. It hasn't got to the SPI flash yet. The ROM bootloader should initialize with SPI bus upon power up, regardless of the existence of flash.

2) FX3 doesn't fall back to USB. The reason I said that is, if it falls back to USB boot, USB control center should have this device show up. However, I didn't see it.

3) removed the series resistor (short that resistor) didn't make a difference. In fact, this is as expected as it wouldn't make sense to me if it works.

Thanks,

Dawei

0 Likes
ChRi_1281516
New Contributor

How is th RST of the FX3 conncted on your board? We also had the same trouble when RST is not pulled low for some ms after power up.

0 Likes
DaLi_3097136
New Contributor II

Thank you for your kind suggestion. The same RST circuit works fine for USB boot. Our RST line has 100K+0.1uF and the resulting time constant is larger than the 1ms requirement of Cypress design guideline. Simulation shows it takes ~2ms before RST exceeds low threshold of 0.45V (0.25*CVDDQ). Below is our simulation of RST pulse width during 1.8V power up. I also tried holding the RST button for longer time before release but it didn't help either.

cypress_reset_simulation.PNG

0 Likes
ChRi_1281516
New Contributor

Dou you have a pull up resistor on the MISO out of the Flash? If so, remove it and install a 10k pull down resistor.

0 Likes
DaLi_3097136
New Contributor II

Thank you for your reply. I don't have PU or PD for MISO. There is only one series resistor. Also I don't understand your logic behind it. In my case, the SPI flash was programmed successfully with the SPI bus. The reason it didn't boot up is actually because there was no SPI clock coming out of FX3. I am not sure if it would be related to whether MISO has PU or PD.

0 Likes
ChRi_1281516
New Contributor

Yes, i know, it´s crazy, but the behavior of the bootloader is in this way. The ROM bootloader expects a logic low level at MISO at the very first beginning of it´s start. Try to put on a pull down resistor to MISO, I´m quit sure the boot will work afterwards. In most cases the boot will work with no resistor, but in some cases the FX3 needs a pull down.

0 Likes
DaLi_3097136
New Contributor II

Thank you. I do remember the MISO line defaulted to high at startup. I am going to try your suggestion and keep you updated.

0 Likes
DaLi_3097136
New Contributor II

Hello, I tried with 10K pulldown on MISO line. However, it didn't make a difference. No SPI activity during boot up, even if MISO is low by default.

0 Likes
DaLi_3097136
New Contributor II

Further update:

Help is needed, Cypress folks...

I verified that on our custom board with FX3, it could boot from USB (PMODE=0b'F11'), and I2C (PMODE=0b'1FF and 0b'F1F, with USB fallback), but not from SPI. In fact, there is not SPI clock at power up or POR when PMODE=0b'0F1' (for SPI boot).

I believe the issue is at FX3's bootloader ROM. I have seen in other post that some early FX3 ICs didn't support SPI boot. But that was year 2012 and I don't think it is likely to happen. Also the date code for the ICs is 1737.

Any idea where I might be missing?

Thanks,

Dawei

0 Likes
DaLi_3097136
New Contributor II

Okay. Finally the truth is revealed. Thanks for those who had tried to help. Hope the following summary could help other designers.

Issue:      1) FX3 has no SPI activity at bootloader stage, when booting from SPI (PMODE[2:0]=0b'0F1)

                2) FX3 boots fine from USB (PMODE[2:0]=0b'F11)

Cause:      PMODE[0] pullup resistor is too weak (100K, in our case), that for some reason, FX3 treats it as high impedance, even though voltage reads high (1.8V).

Explanation:

               1) FX3 has no SPI activity when configured for it, because PMODE is essentially 0b'0FF, which is not defined.

               2) FX3 boots fine from USB because the resulting PMODE[2:0 is 0b'F1F, which happens to be I2C boot, and upon failure it falls back to USB. In this mode, I2C traffic was observed on the scope before the USB fallback. So I was fooled by the fact it ends up booting from USB.

Solution: replace PMODE[0] pullup resistor with 10K or smaller.

Comment: The requirement of resistor for PMODE configuration is not mentioned in FX3 datasheet or design guideline (AN70707). The closest description is on page 14 of AN70707 as below, where it recommends 10K but doesn't explicitly state allowable range.

We recommend adding pull-up and pull-down options (using 10 KΩ) on the PMODE[2:0] signals and load the

combination needed for preferred booting option. This will give the flexibility to debug the system during early

development.

View solution in original post

0 Likes
DaLi_3097136
New Contributor II

It has been days since I raised the issue. I appreciate that user_391200927 has been trying to help out. However, other than Srinath, I don't see other Cypress engineers trying to help so far. Even if I posted the solution later, there is no feedback, no confirmation. That is just awkward, as if I am talking to myself.

As being a customer, I feel obligated to say that the forum support from Cypress could be and should be better. This is not even as good as previous case support. Once we have a technical problem, I am feeling that we are totally on our own. I don't know if the other customers get the same feeling.

0 Likes