How To Configure AM335x Single-board Computer Uboot

1.1 Software introduction

In the actual development process, customers often need to specially develop the host computer configuration software in Forlinx, and all the above functions can be realized through software configuration.

Copy OK335pinmux to the pc of windows system, the path to store OK335pinmux cannot contain Chinese. Enter the OK335pinmux directory, double-click pinmux.exe to start the application.

Configuring AM3354 SBC Uboot step 1

Select the OK335 platform and click the start button to enter the configuration interface:

Configuring AM3354 SBC Uboot step 2

1. 2 Pinmux configuration

In the initialization stage of uboot, uboot will initialize the functions and states of some pins. The default values of these pins have been integrated into the software. Click the PAD list on the left and the window on the right will display the corresponding setting values. .

Take conf_lcd_data0 as an example, click LCD_DATA0 in the list on the left, and the default value set by Forlinx will be displayed in the window on the right.

Configuring AM3354 SBC Uboot step 3

Search for LCD_DATA0 in Cortex-A8 Microprocessors(MPUs) to find LCD_DATA0

Cortex-A8 Microprocessors(MPUs) to find LCD_DATA0

You can view the specific mode information. It can be seen that for the LCD_DATA pin, the MODD0 function is configured by Feiling in the initialization stage of uboot for the LCD data pin. At the same time, you can also view other settings such as up and down.

If the user needs to modify the function, for example, the user needs to turn off LCD_DATA0 to LCD_DAT A7, then click LCD_DATA0 to LCD_DATA7 to modify:

Configuring AM3354 SBC Uboot step 4

When the pin is modified, the corresponding PAD background color in the left PAD list will be set to orange, and the corresponding environment variable setting command will be generated in the lower right text box.

Start the development board and press the space bar continuously to enter the uboot command line menu:

Configuring AM3354 SBC Uboot step 5

Enter 0 to enter the uboot console and paste the command generated in the tool into the command line

Configuring AM3354 SBC Uboot step 6

Enter saveenv to save, restart the development board, you will find that the LCD color display is abnormal (the data pin function has been modified and cannot be output)

If the user wants to restore the LCD_DATA 0 setting in the tool to the default value, just select LCD_DATA 0 in the list on the left, right-click in the window on the right, and select "restore"

Configuring AM3354 SBC Uboot step 7

At this point, the modified mark in the list on the left has been restored, and the information in the text box in the lower right corner has also changed accordingly.

Configuring AM3354 SBC Uboot step 8

1. 3 LCD timing configuration

In order to display the user's LOGO as soon as possible, the OK335 platform of Forlinx realizes the LCD driver in the uboot stage, and the user only needs to change the bmp file to replace the LOGO. But if the user uses his own LCD screen, he needs to modify the corresponding timing parameters.

Configuring AM3354 SBC Uboot step 9

Calculate the corresponding timing value according to the LCD manual and fill in the corresponding text box to generate the corresponding environment variable. The use of the environment variable is the same as the function of setting pins. Paste it into the uboot command line and save it.

1.4 Environment variable editing

The default environment variables of the OK335 platform exist in the ENV partition in the form of binary files. This software supports direct editing of the environment variable binary files. The default environment variable file is located in the tool ok335/uboot.env

Add environment variables:

Slide the window to the lowest end and find the first blank line to edit to add lcdtimings = {(0x0,0x1e0);(0x1,0x320);(0x2,0x27);(0x3,0x15);(0x4,0x3) ;(0x5,0x58);(0x6,0x70);(0x7,0x30);(0x8,0x2625a00);} For example:

Configuring AM3354 SBC Uboot step 10

Configuring AM3354 SBC Uboot step 11

Configuring AM3354 SBC Uboot step 12

Click the "File Operation" button in the upper right corner to enter the drop-down menu, and click "save_uboot.env" to save the operation.

Configuring AM3354 SBC Uboot step 13

Select the OK335 directory and click Save

Configuring AM3354 SBC Uboot step 14

Select "Yes" to replace the existing uboot.env

Configuring AM3354 SBC Uboot step 15

The generated uboot.env can be used for mass production and put it into the SD card together with the system image for system programming.

Remove environment variables:

If you need to delete an environment variable, you only need to delete the value of the item, but do not delete the key. Take deleting the environment variable lcdtimings as an example:

Configuring AM3354 SBC Uboot step 16

Again, click the save button in the upper right corner to save.