cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

Hello,

We are having problems booting our device from an I2C EEPROM. Broadly speaking, the microcontroller seems to crash (or cancel) it's boot procedure and the device is not recognized by our PC. The problem does not appear on the SuperSpeed Explorer Kit, so part of this is our fault, but we are out  of ideas when it comes to understand what is happening.

We have a custom board with a  CYUSB3012-BZXC microcontroller booting from a ST i2c memory (M24M02-DR). Both chips are similar to the ones from the SSEK, although the part numbers are different. We are using 1.2V power for for Microcontroller (which can also handle 1.8V I think). I2C is driven at 100kBps. We are using an USB3 cable and port, altought the microcontroller should be booting in USB2 mode according to the datasheet.The microcontroller is in I2C EEPROM boot ('1ZZ), I'm affraid this is hardcoded and we can't change it at will beyond USB-only and I2C-only.

Our first firmware test was changing the USB descriptor in a premade example to show we could reprogram it. We have also tried removing the RTOS from the example (instead placing test code in main()) and using different unmodified examples. Changing the USB descriptor seems to work, but we couldn't confirm that playing with the RTOS actually worked (we couldn't get a LED flashing).

Here's what we have tried and what we can tell from our testing:

We added a define in code to fit the memory size. This was done before I started workiing on this, so I can only trust that this is what the code was meant to be.

Following the BootOption documentation, we changed the default elf2img arguments to fit our memory size and changed the I2C speed to 100kBps. This appears to have worked when we check the first image header read.

On the SSEK, booting from the I2C memory leads to the device being recognized. We timed the I2C communication to take around 10 seconds. Programming the RAM directly leads to the same result.

On our board, programming the RAM directly makes it so that the device is recognized correctly with it's new name. Programming the I2C shows success and the I2C lines are indeed alive while reprogramming is being done.

When we try to boot, however, the communication stops after around 1.5 seconds and the line and device appear dead. We are using the very same image in both case. Which is configured for our board's memory chip.

The 3.3V and 1.2V alimentations as well as the microcontroller's main clock are clear and stable at all time once power is on.

Any ideas on what we can try next or what might be happening?

I think this is all we have so far, if more informations are needed or if this post is unclear, feel free to shout at me and I'll clarify this.

EDIT : Since writing this post, we have noticed that the I2C header showed a size of 32kb. However, the problem is still there after changing it.

EDIT:

Added i2c memory schematic (17-10-2017)

0 Likes
5 Replies
YangyangC_06
Employee

Hi Thomas,

The description of this problem is very long....

I understand that you could not boot from EEPROM. I am guessing it is a hardware issue.

Could you please share the schematic file of I2C part?

0 Likes
Anonymous
Not applicable

I have attached a screenshot of the memory schematic to the main post. As well as more precision of what we have tried since then. The two I2C pins are connected directly to the I2C pins of the microcontroller, they appear to work fine until it stops. The WC pin is connected to another GPIO, it is always low during write or read.

Sorry for the long post, I'd rather give more information than not enough.

0 Likes
YangyangC_06
Employee

Hi Thomas,

Sorry that I was not informed your new reply.

I don't know the part number of EEPROM from the screenshot you attached. So I suggest you to check if WC=LOW is OK.

If it is correct, you could download the I2C W/R example project(I2CDMA project or I2CReg project in the path of SDK) into RAM.

It provides several APIs to write to or read from external I2C device. In this way you could check if the EEPROM is good to W/R.

Hope this will help.

0 Likes
Anonymous
Not applicable

I can confirm that WC=Low is the way it should be.

Considering the problem is at the bootloader stage, I guess you propose the I2C examples to see wether or not the memory chip is correctly written and read?

Anyway I'll check this out.

0 Likes
YangyangC_06
Employee

HI Thomas,

Considering the problem is at the bootloader stage, I guess you propose the I2C examples to see wether or not the memory chip is correctly written and read?

>> Yes,that is exactly what I mean.

For the I2C boot issues that I have known, the root reasons could be summarized below.

1. The hardware design issue.

2. The firmware downloaded into EEPROM is not exactly same to the img file, i.e., the firmware in EEPROM is invaild.

3. The firmware reading is not correct in the boot procedure.

In general, you don't need to specify the I2C clock speed in post-build command.

Just choose EEPROM according to datasheet and design circuit according to AN70707. Then everything will work.

Hope this could help you.

0 Likes