This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

求助:C55_CSL_3.03库,USB_MSC例程固化到FLASH,自启动BOOT成功后,MSC初始化总是失败,而仿真则没有问题。

各位好!

如题,遇到此情况后,我以为是GEL文件问题,就在程序开始处添加了新的初始化程序,如下:

 *(ioport volatile unsigned *)0x1C04 = 0x02;//软件计数复位
 *(ioport volatile unsigned *)0x1C05 = 0x00fb;//硬件外设复位
  for (a=0; a<500; a++);
 *(ioport volatile unsigned*)0x0001 = 0x000E;//使能 MPORT
 asm("   idle");
 *(volatile ioport Uint16*)(0x1c02) = 0x0;//
 *(volatile ioport Uint16*)(0x1c03) = 0x0;// 开启所有外设时钟
 *(ioport volatile unsigned *) 0x1c1f = 0x0;     
 *(ioport volatile unsigned *) 0x1c20 = 0x8be8;
 *(ioport volatile unsigned *) 0x1c21 = 0x8000;
 *(ioport volatile unsigned *) 0x1c22 = 0x0806;
 *(ioport volatile unsigned *) 0x1c23 = 0x0000;
   while ( ((*(ioport volatile unsigned *) 0x1c22) & 8) == 0) ;
  *(ioport volatile unsigned *) 0x1c1f = 0x1;

  *(ioport volatile unsigned *)0x1C00 = 0x6100;

但是一样的结果,

然后在程序中又添加了其他模块的初始化程序在MSC初始化之前,在MSC初始化之前的程序都能正常运行

我的所有模块初始化程序:

status = I2cConfigure();//IIC配置初始化
 IISconfig(AIC_3204_bit);//AIC_BIT = 24
 IRQ_globalDisable();
 AIC3204_init(WAV_PreSec,AIC_3204_bit);//WAV_PreSec = 48k;AIC_3204_bit = 24_bit;
 IRQ_globalEnable();
 oled_init();//LCD初始化,并显示LOGO。

status = configSdCard(CSL_MMCSD_OPMODE_DMA);

status = CSL_mscTest();//在此程序前的程序都能正常运行,

到最后一段程序时,就会跑飞,跟踪的汇编程序死的位置也不尽相同,不过都是在读SD卡 的函数里面跑飞的。

希望能有高人帮忙解决,这个例程存在着这么严重的BUG,又容易被人忽略,希望TI 的工程师能一起解决此问题!

谢谢各位了!