2011-10-12 02:26:02     使用新型号flash,uboot不能启动

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

2011-10-12 02:26:02     使用新型号flash,uboot不能启动

xiangang zhu (CHINA)

Message: 103801   

我用的是bf561-ezkit开发板,无修改编译uboot,下载

运行工作的很好。由于项目需要,我们用了另外的flash和

sdram芯片。之前只是跑裸机程序,将项目工程ldr文件烧写到

flash里,工作没有问题。因此,应该可以排除flash或者SDRAM

硬件上的问题。

现在打算跑ucliunx系统,便于以后升级和管理。所以需要修改

uboot,使之在自己的板子上能运行起来。

我们用的是intel TE28F128J3C的flash芯片(128 sector),大小为16M。

SDRAM大小和开发板上一样。我们的内核时钟为27*22=594Mhz

系统时钟为594/5=118.8,我修改了和SDRAM有关的寄存器。

把flash扇区设置为128.其他的地方基本没有修改,我用的

uboot版本为uboot-1.1.6-2008R1.5。uboot.bin文件烧录进去,

uboot没有正常打印信息。我的串口是正常的,之前做过测试。

我有疑问的地方是:

(1)用intel的烧写驱动在visual dsp下烧写时,

检测显示的扇区和实际flash的扇区大小不一样,显示的flash型号不是

同一型号,但烧写都没问题。

(2)烧写进去后SDRAM没按uboot里配置的118.8MHZ输出,

而只输出27*2=54MHZ。

(3)bf561-ezkit用的是公共驱动,TE28F128J3C手册上说

也支持公共驱动接口。不像board/bf533文件夹下有自己的

flash.c和flashdefine.h文件。即用的自己的flash驱动。

总之,现在真的很困惑,我想应该还是uboot修改上出现了问题。

我附上我的DSP与SDRAM和flash之间的

接线图,供大家参考,希望能得到大家的帮助。非常感谢!!!

 

捕获.JPG

捕获1.JPG

捕获2.JPG

QuoteReplyEditDelete

 

 

2011-10-12 02:45:37     Re: 使用新型号flash,uboot不能启动

Aaron Wu (CHINA)

Message: 103802   

 

First if you want to boot from Flash, you are supposed to use the *.ldr instead of the *.bin, ldr is a special format that the blackfin and it's Romcode support for booting, with pre-defined rules.

 

Second as both of your DRAM and FLASH are replaced, we can't tell "can't see any boot log" is caused by the FLASH or the DRAM, recommend you to keep the DRAM unchanged first, try to make sure the FLASH booting is OK, then go to tunning the new DRAM timming. Or vice vesa.

QuoteReplyEditDelete

 

 

2011-10-12 03:09:31     Re: 使用新型号flash,uboot不能启动

Aaron Wu (CHINA)

Message: 103803   

 

Sorry missed something, if you are using BYPASS boot mode, you should use the *.bin, check your u-boot board config files for details: include/configs/bf561-ezkit.h

 

By default it's #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS.

 

How do you Flash your bootloader, usually you can choose to do it by a gnICE or UART, check the wiki: http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:loading#programming_flash_via_jtag

QuoteReplyEditDelete

 

 

2011-10-12 23:11:04     Re: 使用新型号flash,uboot不能启动

Aaron Wu (CHINA)

Message: 103818   

 

We are actually a little confused by your description earlier in another post that after flashing the ldr file it works. By defaut the bf561 board is using bypass mode, means you are supposed to use the *.bin instead of the *.ldr. Have you change the bootmode in config file   include/configs/bf561-ezkit.h explicitily?

 

Usually in the Linux enviroment we use the gnICE or ldr uart utility to flash the bootloader, as I mentioned earlier. So we suggest you to start from a clean copy of the u-boot source code, first change your FLASH only, check if it works well to boot the u-boot, then move to replace the DRAM. Keep us updated of your progress.

QuoteReplyEditDelete

 

 

2011-10-14 10:20:39     Re: 使用新型号flash,uboot不能启动

xiangang zhu (CHINA)

Message: 103869   

 

我把uboot在viusal dsp下调试了一下,我在uboot 用汇编配置了一下get_sclk()需要的几个参数,同时加入了一段循环代码显示A和B,我把这段代码嵌套在产生init regester输出的中,使之不断打印显示AB early init regester。

 

在visual dsp 中调出PLL_regester寄存器,PLL_CTL=0x2c00 ,也就是将内核倍频22倍。加入断点运行,串口输出为AB early  init  regester,sdram 频率为118.8MHZ。但有时候PLL_CTL=0x1400(默认的10倍频),这样就毫无输出。我算了下默认情况下,SDARM输出频率为54Mhz。我在头文件中定义了PLL_CTL=22,为什么编译之后烧入uboot。感觉像没写进寄存器一样,没起到作用。

 

另外,我在memory/fill下载入uboot.bin文件,这个PLL_CTL里的值0x1400可以更改为0x2c00,这样就能调试打印出信息了。是不是这里面改成功了,用uboot.bin烧进去,却没有写成功呢,依然还是0x1400.我改怎么用这个memory/fill,来调试出其中到底出了什么问题了。

QuoteReplyEditDelete

 

 

2011-10-16 23:10:25     Re: 使用新型号flash,uboot不能启动

Aaron Wu (CHINA)

Message: 103884   

 

Could you try may suggestions?

 

Please read the wiki document I mentioned. And use the gnICE or uart ldr util to deal with your u-boot flashing. We don't degbug the u-boot in VDSP environment.

 

To enable your new FLASH please just pay attention to include/configs/bf561-ezkit.h and make necessary changes. Again suggest you to mount back the original DRAM back if you are not sure about your FLASH porting. This makes the life easier than trying to bring them two at the same time.

QuoteReplyEditDelete

 

 

2011-10-17 00:08:45     Re: 使用新型号flash,uboot不能启动

Sonic Zhang (CHINA)

Message: 103885   

 

We don't support VDSP. Please following the uboot wiki Aaron mentioned and flash via gnICE and jtag utility in the released blackfin GNU toolchain.

QuoteReplyEditDelete

 

 

2011-10-17 00:15:47     Re: 使用新型号flash,uboot不能启动

Aaron Wu (CHINA)

Message: 103886   

 

Also we suggest you to use the 2010R1 release of U-boot, kernel and toolchain, 2008 you are using is pretty old. Do you have a gnICE or ICE100? I doubled checked if the 561 does not support the uart ldr util you may need to use the ICE for Flashing. check http://docs.blackfin.uclinux.org/doku.php?id=buy_stuff for where to buy the items.

Attachments

Outcomes