【OK210试用体验】好好学A8——启动模式 - 在线问答 - 电子技术论坛 - 最好最受欢迎电子论坛!

【OK210试用体验】好好学A8——启动模式

mhp0114 ( 楼主 ) 2015-8-24 08:24:13  只看该作者 倒序浏览
好好学A8S5PV210启动模式
1、启动方式:
S5PV210的手册中讲到的关于启动模式:
The booting device can be chosen from following list:
General NAND Flash memory
OneNAND memory
SD/ MMC memory (such as MoviNAND and iNAND)
eMMC memory
eSSD memory
UART and USB devices
根据以上所列出的内容,我们可以知道,210可以从NANDOneNANDSDMMCEMMC等启动,那有这么多的启动方式相对于我们做产品做研发,都是非常方便的。特别都是对产品程序的升级等。我们最常用的启动方式是nandnorsd(卡)方式进行启动。

210的启动方式的选择由XOM[0:5]管脚的电平所决定,我们目前开发板NAND启动和SD卡启动。

图1OM管脚状态


图2 拨码开关

这是关于板子上这XOM[0:5]的管脚,其中OM0OM5直接通过电阻接地,被拉低。而XOM[1:4]管脚拉到了拨码开关上,进行拨码选择启动方式。如何进行拨码开关的拨码,可以参考飞凌提供的OK210硬件手册。如下图:

图3 两种启动方式拨码状态

2、启动原理:

图4 启动流程

根据上图所示,我们来分析下210的启动过程。
210的启动过程主要分成三个部分,就是我们常说的BL0BL1BL2三个阶段。
1、BL0阶段,代码在内部ROM中:iROM code: Contains small and simple code, which is platform-independent and stored in internal memory。这里指出了这个阶段的代码是与平台相关的,就是说和进行与芯片硬件紧密的工作。The iROM loads the first boot loader image from a specific booting device to internal 96KB SRAM. The booting device is selected by Operating Mode (OM) pins.IROM根据芯片的boot引脚知道选择了哪个设备作为引导,然后拷贝对应设备的前16K内容到SRAM中并对其进行校验。 It initializes basic system functions such as clock, stack, and heap在这个阶段,代码再64kIROM中,主要的任务是进行系统、时钟、堆栈等内容的初始化。

The booting sequence in internal ROM is as follows:
1.  Disable the watchdog timer.
2.  Initialize the instruction cache controller.
3.  Initialize the stack and heap region.
4.  Check secure key.
5.  Set Clock divider, lock time, PLL (MPS value), and source clock.
6.  Check OM pin and load the first boot loader (The size of boot loader depends on S/W) from specific device  
  (block number 0) to iRAM.
7.  If secure booting is successful, execute integrity check
8.  If integrity check passes, then jump to the first boot loader in iRAM (0xD002_0010)
以上所列为BL0段的任务。
1、BL1阶段,代码在外部的启动器件中:First boot loader: Contains small and simple code, which is platform-independent and stored in external memory device. Related to secure booting.这个阶段的代码也和平台相关,但此时的代码在外部存储器中。The first boot loader loads the second boot loader then may check the integrity of the second boot loader according the secure boot key values.BL1除了进行板子初始化的任务外,还有个重要的作用是将加载BL2段代码。
2、BL2阶段,代码在外部启动器件中:Second boot loader: Contains complex code, which is platform-specific and stored in external memory device.其内容就相对复杂了一些。The second boot loader initializes system clock,UART, and DRAM controller. After initializing DRAM controller, it loads OS image from the booting device to DRAM.BL2阶段的代码进行了UARTDDR等初始化工作,然后将器件中剩下的代码拷贝到DDR中。跳转PC指针指向DDR中代码的起始位置。
The booting sequence in internal SRAM is as follows:
1.  Load the second boot loader from boot device to iRAM.
2.  If secure booting is successful, execute integrity check.
3.  If integrity check passes, then jump to the second boot loader in iRAM (The jumping address depends on  
user's software)
4.  If integrity check fails, then stop the first boot loader.
5.  The second boot loader Initializes the DRAM controller.
6.  Load the OS image from specific device (block number 1) to DRAM.  
7.  Jump to OS code in DRAM (0x2000_0000 or 0x4000_0000)
以上所列是BL1BL2的任务。

DDR中的代码:
The booting sequence in DRAM is as follows:
1.  If S5PV210 is powered on from SLEEP, DEEP_STOP, or DEEP_IDLE modes, then restore the previous  
state.
2.  Jump to OS code.


0个回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则


关闭

站长推荐上一条 /6 下一条

小黑屋|手机版|Archiver|电子发烧友 ( 湘ICP备2023018690号 )

GMT+8, 2024-12-1 02:56 , Processed in 0.602760 second(s), Total 64, Slave 44 queries .

Powered by 电子发烧友网

© 2015 bbs.elecfans.com

微信扫描
快速回复 返回顶部 返回列表