Every day we are experiencing pcDuino power on and off, many people would wonder how to start pcDuino. Today we will analyze pcDuino start-up process.
The above figure is A10 chip flowchart.In the following , some processes is useful for pcDuino, mabe there are some other processes. when power on,PcDuino can determine whether BSP pin state is 0 or not.When power-UP, Holding down the sw2 button, BSP pin state will be 0.
At this time, it will enter into the USB boot mode, when our pcDuino connect to computer through otg , the computer will recognize pcDuino usb device,at this time, hold down the sw2 key, the computer will send update information to pcDuino ,then update our system. Then we can burn the img to nand by software. This is the reason why when pcDuino update system by usb wire ,the first step is to connect pcduino to computer by otg.
But we all know. Under normal circumstances , when pcDuino power on , we don’t need the sw2 key. So this time, pcduino will execute the next step in the flow chart.SDC0 (PF port) boot operation, this step seems very difficult , in fact, is to check if there is a tf card in our board card 0 ,and the card can identify startup programs. At this time ,it will Start from the card 0. This is why pcduino priority to boot from the card.
But pcduino found when we did not insert into the system image with burn cards, pcDuino this time we will check whether there nand flash inside what it wants. We know that our system is burned to nand flash inside, but in fact pcDuino not directly boot from nand flash inside. Because we pcDuino the nand flash is a block storage device, the data is read once it is 520byte, but our system is an arm of the 32-bit system architecture, which uses a program counter one by one have to read instructions, a read instruction is only 32 bytes is 4 byge.
Analyzing experienced after a series of flowcharts, Nand short program starting position, the initialization is complete bootloader start hardware, software environment is ready, and finally call the operating system kernel. After this series of operations to perform. nand inside the kernel code was copied into RAM inside running. Our pcDuino considered is started.