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.
Select the OK335 platform and click the start button to enter the configuration interface:
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.
Search for LCD_DATA0 in 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:
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:
Enter 0 to enter the uboot console and paste the command generated in the tool into the command line
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"
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.
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.
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:
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.
Select the OK335 directory and click Save
Select "Yes" to replace the existing uboot.env
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:
Again, click the save button in the upper right corner to save.