TI中文支持网
TI专业的中文技术问题搜集分享网站

OMAP-L137: 关于OMAP-L137的I2C0 Master模式下的BootLoad问题

Part Number:OMAP-L137Other Parts Discussed in Thread: TMS320C28346

在仿真器和CCS环境下,OMAP-L137的C674X软件正常运行。用AISgen for D008K005将.out文件转换为.bin文件(Boot mode为I2C0 Master,其他设置亦与硬件适配),然后将.bin下载到基于I2C接口的24C512存储器。

问题:上电后,没有实现I2C0 Master模式下的BootLoad,软件不能脱离仿真器及CCS环境实现自己启动并运行。

希望得到ti公司及专业人士的技术支持,以尽快解决问题。谢谢!

相关情况说明:OMAP-L137上使用了C674X处理器,软件也是基于C674x的软件,没有使用ARM/TI OS/Linux,没有配置外部NAND Flash及SDRAM。硬件设计符合I2C0 Master模式要求。通过修改AISgen for D008K005编译参数,生成不同的.bin文件,经过测试均不能实现自启动。

 联系:何楚平 18930374002 chuping.he@minis-tech.com

Shine:

请测一下boot管脚的电平是否设成了I2C0 master模式? 用示波器量一下I2C管脚,看有没有数据?

,

chuping he:

在应用程序中用到了I2C0,也是Master,是没有问题的。同一个电路板上用到了TMS320C28346,也是基于主i2c的24C512启动加载,也是没有问题。

,

chuping he:

在应用程序中用到了I2C0,也是Master,是没有问题的。同一个电路板上用到了TMS320C28346,也是基于主i2c的24C512启动加载,也是没有问题。

,

Shine:

C6657的I2C boot mode配置和TMS320C28346应该不一样的。

请先确定boot管脚模式是否配置正确,如果进入boot mode,在加载程序时,I2C管脚上应该有读写信号,先确定是否进入了I2C boot mode。

,

chuping he:

BOOTCFG寄存器的值为0x0000fb70,是符合I2C0 master模式要求的,这在问题表述中已说明了。对于基于i2c的eeprom工作是否正常,我用ti发布的测试基于i2c的eeprom例程测试了,结果为testing i2c eeprom….,PASS ,   all tests oassed,也就是通过。我认为没有必要纠结这些基本问题,肯定是反复检查没有问题,但问题然后没有解决才找你们ti的.

,

Shine:

如果确定进入I2C master mode了,那就可以用仿真器去跟踪一下boot过程,看是程序没有正确加载还是加载了没有正确运行。具体方法见下面。

Key Steps
Be careful with gel files

Many gel files are intrusive on the target. For example, they might configure the PLL and/or External Memory Interface (EMIF). If you're having issues with getting your device to work properly when it boots from flash, you should double-check that you're not reliant on the gel file to setup something critical like the PLL or EMIF. Also, you don't want the gel file to modify the way the processor runs when trying to debug issues. You want the processor to boot exactly as it always does when debugging from flash.

"Load Symbols" instead of "Load Program"

When debugging an application from flash, you want to let the application boot in its normal manner. If you select "load program" in CCS then you are overwriting the application that loaded from flash and not debugging the code as it runs normally. You should instead do "load symbols" in CCS and then select your .out file. This will allow you to debug your code using variable/function names without overwriting the code that boots from the flash.

CCS 3.3: Go to File -> Load Symbols -> Load Symbols Only
CCS 4.x: Right-click on the project and select Debug Options. On the "Debugger" tab choose "Load Symbols" instead of "Load Program"
CCS 5.x: In the "Debug View" tab choose "Run"–> "Load" –> "Load Symbols"

Use Hardware Breakpoints

A software breakpoint works by using a special opcode, or modifying an opcode. A benefit to software breakpoints is that there's no limit to the number you can use. The drawback is that when the code gets reloaded (e.g. when the bootloader codes runs after a reset) the software breakpoints get overwritten.

If you're allowing the device to boot from flash, you'll need to have your FIRST breakpoint be a HARDWARE breakpoint in order to force the target to halt. Just right-click and select "Toggle Hardware Breakpoint" in CCS to set a hardware breakpoint.

You can still use software breakpoints once you've hit that first hardware breakpoint. After a reset, however, you need to "refresh" all the software breakpoints.

First, open the Breakpoint Manager

CCS 3.3: Go to Debug -> Breakpoints
CCS 4.x: Go to View -> Breakpoints

In the breakpoint manager you can click "disable all" and "enable all" such that CCS will set them again.

,

chuping he:

代码调到SharedRAM并从这里开始执行是可以的,但是调到L1PRAM开始执行是 不行的。这是目前测试的结果。

在SharedRAM执行时出现了其他一些问题,这是L1PRAM执行时没有的。现在准备在执行到SharedRAM再将代码调到L1PRAM执行,以避免在SharedRAM执行时出现的问题。

我认为进入用户程序时,只能从SharedRAM执行是一个bug(至少我测试的是这样),希望ti验证并向用户告知。

到目前为止,这个问题算是基本解决。

谢谢!

,

Shine:

L1PRAM上电后默认是配置成cache,如果要当RAM用的话,在load程序前要先disable掉cache。抱歉,我手头没有OMAP-l137的板子,您可以看一下ROM bootloader起来后有没有去disable cache,如果没有的话,代码是不能直接加载到cache里的,可以和仿真器在线调试时的配置比较一下。

赞(0)
未经允许不得转载:TI中文支持网 » OMAP-L137: 关于OMAP-L137的I2C0 Master模式下的BootLoad问题
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1