wiki:linux/devmem

Version 3 (modified by Ryan Erbstoesser, 12 months ago) ( diff )

add more examples

This tool can be handy if direct memory address modification is needed based on a change desired after reading the processor reference manual available on Freescale's Website Link

devmem is a powerful, yet dangerous tool for modifying memory addresses.

root@OpenWrt:/# devmem
BusyBox v1.19.4 (2013-10-02 00:06:48 PDT) multi-call binary.

Usage: devmem ADDRESS [WIDTH [VALUE]]

Read/write from physical address

        ADDRESS Address to act upon
        WIDTH   Width (8/16/...)
        VALUE   Data to be written


Example Writing:

root@OpenWrt:/# devmem 0x20e05cc 32 0x1b0b8

Example Reading:

root@OpenWrt:/# devmem 0x20E06CC 32
0x0001B0B1

Processor Pin Mux DevMem Example

Let's for example say we would like to modify a pin-mux register on a i.MX8 processor. Utilizing the reference manual for the processor (available from the processor manufacturer) we see we need to use devmem to write the value 101 (0x5 in hex) to the proper register.

Code:

devmem 0x30330244 32 0x5 

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.