Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Am335x uboot lights up LED

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

First briefly analyze the uboot startup process

Make am335x_evm, corresponding to boards.cfg:

Am335x_evm arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1

So the corresponding starting address is in the / arch/arm/cpu/armv7/start.S file.

Board level initialization initializes the peripheral pin setting in the s_init function.

A8_LED is connected to R6 of am335x, corresponding to the

MODE:7,GPIO2_25.

Define the module_pin_mux structure GPIO2_25

Static struct module_pin_mux GPIO2_25 [] = {{OFFSET (lcd_ac_bias_en), (MODE (7))}, / * LED * / {- 1},}

GPIO2_25 corresponds to serial number 32 "2" 25 = 89 to apply for access to GPIO2_25

Gpio_request (89, "led")

Set IO to output mode

Gpio_direction_output (89d0)

Set IO to low level and LED light on

Gpio_set_value (89d0)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report