完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我们有问题从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个回答
|
|
嗨,托马斯,
这个问题的描述很长… 我知道你不能从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? |
|
|
|
我已经附上了主页的内存示意图截图。以及我们从那时起尝试过的更精确。两个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. |
|
|
|
ZXH22770 发表于 2018-12-19 11:39 嗨,托马斯, 对不起,我没有收到你的新答复。 我不知道你所附的截图中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. |
|
|
|
我可以确认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. |
|
|
|
ZXH22770 发表于 2018-12-19 12:00 嗨,托马斯, 考虑到问题在Bootloader阶段,我猜你建议I2C例子来查看内存芯片是否正确地被写入和读取了。 是的,这正是我的意思。 对于我所知道的I2C引导问题,可以归纳如下的根本原因。 1。硬件设计问题。 2。下载到EEPROM的固件与IMG文件不完全相同,也就是说,EEPROM中的固件是非法的。 三。在引导过程中固件读取不正确。 一般来说,您不需要在POST生成命令中指定I2C时钟速度。 根据AN70707,根据数据表和设计电路选择EEPROM。然后一切都会奏效。 希望这能帮到你。 以上来自于百度翻译 以下为原文 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. |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2103 浏览 1 评论
1849 浏览 1 评论
3667 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1784 浏览 6 评论
1534 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
566浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
420浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
435浏览 2评论
381浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
913浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 19:49 , Processed in 0.831408 second(s), Total 54, Slave 48 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号