Open main menu

DAVE Developer's Wiki β

Changes

Pin Mux Configuration in U-Boot (Naon)

2,355 bytes added, 07:58, 8 May 2012
no edit summary
{{Applies To U-Boot}}
{{InfoBoxBottom}}
 
=== Introduction ===
 
The first thing to do when adding/modifying a peripheral is configure correctly the internal Pin Mux: in fact, nearly every peripheral function can be attached to more than one pin and nearly every pin is shared between two or more peripheral.
 
=== Texas Instruments Pin Mux Utility ===
 
Pin Mux is quite complex in [[:Category:Naon|Naon]] and, fortunately, a tool from TI can help: we suggest to download and install TI [http://processors.wiki.ti.com/index.php/Pin_Mux_Utility_for_ARM_MPU_Processors Pin Mux Utility] from [http://focus.ti.com/docs/toolsw/folders/print/pinmuxtool.html TI website].
 
Software installation and generic usage documentation is available on [http://processors.wiki.ti.com/index.php/Pin_Mux_Utility_for_ARM_MPU_Processors this TI wiki page]
 
=== Pin Mux Configuration in u-boot ===
 
Due the fact the correct configuration of pin mux usually should be applied as soon as possible and that's better if pin mux is done is only one place, Dave choose to move all its initialization inside the startup code of [[:Category:U-Boot|U-Boot]]
 
Changing default pin mux configuration is just a matter of:
# open TI Pin Mux configuration
# load the Dave provided Naon default configuration
# change the mux as needed
# export the generated source code into the [[:Category:U-Boot|U-Boot]] source tree
# [[Development_Environment_HowTo_%28NELK%29#Build.2Fconfigure_U-Boot_only|rebuild u-boot]] and update it on your Naon board
 
=== Exporting generated source file ===
 
Pix Mux Utility export function, generate two source file:
# ''mux.h'': which contains only pin mux registers offset. This file does NOT change when user changes pin mux configuration. It does NOT need to be updated.
# ''pinmux.h'': which contains pin mux register values for each pin. This is the file that need to be updated in U-Boot source code
 
To update the default pin mux configuration with your changes just overwrite the <code>board/dave/naon/pinmux.h</code> file inside the U-Boot source tree with the generated one.
 
{{Board Specific Information|text=To avoid timestamp problems and broken dependency, before building U-Boot we suggest to run '''u-boot_clean''' target:
 
<pre class="workstation-terminal">
nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$ make u-boot_clean u-boot u-boot_install
</pre>
}}