Cypress技术william hill官网
直播中

李萍

7年用户 1412经验值
私信 关注
[问答]

赛普拉斯USB3微控制器I2C启动问题

你好,
我们有问题从I2C EEPROM引导我们的设备。一般来说,微控制器似乎崩溃(或取消)它的启动过程和设备不承认我们的PC.问题没有出现在超速资源管理器套件,所以这部分是我们的错,但我们没有主意时,它是为了了解正在发生的事情。
我们有一个自定义板与CysB3012 BZXC微控制器从ST I2C内存启动(M24M02-DR)。两个芯片都类似于SSEK的芯片,虽然部件号是不同的。我们正在使用1.2V的功率用于微控制器(也可以处理1.8V,我认为)。I2C驱动在100kbPs。我们使用USB3电缆和端口,应该根据数据表在USB2模式下引导微控制器。微控制器处于I2C EEPROM启动(‘1ZZ’)中,我认为这是硬编码的,我们不能只在USB和I2C上随意改变它。
我们的第一个固件测试是在一个预制的例子中改变USB描述符,以显示我们可以重新编程。我们还尝试从示例中删除RTOS(而不是在主()中放置测试代码),并使用不同的未修改示例。改变USB描述符似乎是有效的,但我们不能确认玩RTOS实际上是有效的(我们不能得到LED闪烁)。
这是我们尝试过的,我们可以从测试中看出:
我们在代码中添加了一个适合内存大小的定义。这是在我开始工作之前完成的,所以我只能相信代码就是这样。
在BooSt选项文档之后,我们改变了默认的ELF2IMG参数,以适应我们的内存大小,并将I2C速度更改为100KbPs。当我们检查第一个图像头读到时,这似乎已经起作用了。
在SSEK上,从I2C存储器引导导致设备被识别。我们定时I2C通信大约需要10秒。对RAM编程直接导致相同的结果。
在我们的板上,直接对RAM进行编程,使设备能够正确地识别它的新名称。编程I2C显示成功,I2C线确实是活着的,同时正在进行重新编程。
然而,当我们尝试启动时,通信在大约1.5秒后停止,线路和设备出现死机。在这两种情况下,我们都使用相同的图像。这是为我们的板的内存芯片配置。
一旦电源接通,3.3V和1.2V的供电以及微控制器的主时钟在任何时候都是清晰和稳定的。
有什么想法,我们可以尝试下一步或可能发生什么?
我认为这是我们目前所拥有的,如果需要更多的信息,或者如果这个帖子不清楚,请随时对我大喊大叫,我会澄清这一点。
编辑:自从写这篇文章后,我们注意到I2C标题显示的大小是32 KB。然而,问题在改变之后仍然存在。
编辑:
新增I2C内存示意图(17-10-2017)
第二版
27.3 K

以上来自于百度翻译


     以下为原文
  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)


回帖(5)

潘沪城

2018-12-19 15:11:17
嗨,托马斯,
这个问题的描述很长…
我知道你不能从EEPROM启动。我猜想这是一个硬件问题。
请分享I2C部分的原理图文件好吗?

以上来自于百度翻译


     以下为原文
  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?
举报

李萍

2018-12-19 15:26:10
引用: 缘来伴一生 发表于 2018-12-19 11:24
嗨,托马斯,
这个问题的描述很长…
我知道你不能从EEPROM启动。我猜想这是一个硬件问题。

我已经附上了主页的内存示意图截图。以及我们从那时起尝试过的更精确。两个I2C引脚直接连接到微控制器的I2C引脚,它们看起来很好,直到它停止。WC引脚连接到另一个GPIO,它总是低的写或读。
对不起,长篇大论,我宁愿提供更多的信息而不是不够。

以上来自于百度翻译


     以下为原文
  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.
举报

潘沪城

2018-12-19 15:31:24
引用: ZXH22770 发表于 2018-12-19 11:39
我已经附上了主页的内存示意图截图。以及我们从那时起尝试过的更精确。两个I2C引脚直接连接到微控制器的I2C引脚,它们看起来很好,直到它停止。WC引脚连接到另一个GPIO,它总是低的写或读。
对不起,长篇大论,我宁愿提供更多的信息而不是不够。

嗨,托马斯,
对不起,我没有收到你的新答复。
我不知道你所附的截图中EEPROM的零件号。所以我建议你检查WC是否低。
如果是正确的,可以下载I2C W/R示例项目(SDK路径中的I2CDMA项目或I2CREG项目)到RAM中。
它提供多个API来从外部I2C设备写入或读取。这样你就可以检查EEPROM是否对W/R有好处。
希望这会有所帮助。

以上来自于百度翻译


     以下为原文
  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.
举报

李萍

2018-12-19 15:47:25
引用: 缘来伴一生 发表于 2018-12-19 11:44
嗨,托马斯,
对不起,我没有收到你的新答复。
我不知道你所附的截图中EEPROM的零件号。所以我建议你检查WC是否低。

我可以确认WC=低是应该的方式。
考虑到问题在Bootloader阶段,我猜你建议I2C例子来查看内存芯片是否正确地被写入和读取了。
不管怎样,我来查一下。

以上来自于百度翻译


     以下为原文
  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.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分