FAQ: [#6912] twi i2c lcd fails to print message on bf548-ezkit board(2011)

Document created by Aaronwu Employee on Sep 12, 2013
Version 1Show Document
  • View in full screen mode

[#6912] twi i2c lcd fails to print message on bf548-ezkit board

Submitted By: Mingquan Pan

Open Date

2011-11-30 01:18:40     Close Date

2011-12-12 03:58:14


Medium     Assignee:

Aaron Wu


Closed     Fixed In Release:


Found In Release:

2011R1     Release:


N/A     Board:



ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:


Uboot version or rev.:

    Toolchain version or rev.:


App binary format:


Summary: twi i2c lcd fails to print message on bf548-ezkit board



twi i2c lcd fails to print message on bf548-ezkit board.


## Booting kernel from Legacy Image at 02000000 ...

   Image Name:   bf548-0.2-3.1.0-ADI-2012R1-pre-s

   Created:      2011-11-30   2:49:52 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    5714783 Bytes = 5.5 MiB

   Load Address: 00001000

   Entry Point:  002cfe68

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 002cfe68

Linux version 3.1.0-ADI-2012R1-pre-svn10232 (test@adsl) (gcc version 4.3.5 (ADI/svn-5686) ) #21 Wed Nov 30 10:49:45 CST 2011

register early platform devices

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart1] enabled

early printk enabled on early_BFuart1

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x001e6880

  rodata    = 0x001e6880-0x0028bd1c

  bss       = 0x0028c000-0x002a09fc

  data      = 0x002a09fc-0x002c6000

    stack   = 0x002c4000-0x002c6000

  init      = 0x002c6000-0x00a93000

  available = 0x00a93000-0x03e00000

  DMA Zone  = 0x03e00000-0x04000000

Hardware Trace active and enabled

Boot Mode: 3

Reset caused by Software reset

Blackfin support (C) 2004-2010 Analog Devices, Inc.

Compiled for ADSP-BF548 Rev 0.2

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 525 MHz core clock and 131 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

  External memory: cacheable in instruction cache

  L2 SRAM        : uncacheable in instruction cache

Data Cache Enabled for CPU0

  External memory: cacheable (write-through) in data cache

  L2 SRAM        : uncacheable in data cache

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 15748

Kernel command line: root=/dev/mtdblock0 rw ip= earlyprintk=serial,uart1,57600 console=ttyBF1,57600 ip=

PID hash table entries: 256 (order: -2, 1024 bytes)

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 52052k/65536k RAM, (7988k init code, 1942k kernel code, 894k data, 2048k dma, 612k reserved)


Configuring Blackfin Priority Driven Interrupts

Console: colour dummy device 80x25

console [ttyBF1] enabled, bootconsole disabled

console [ttyBF1] enabled, bootconsole disabled

Calibrating delay loop... 1044.48 BogoMIPS (lpj=2088960)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (16 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 48 KB (41 KB free)

Blackfin L2 SRAM: 128 KB (128 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

ezkit_init(): registering device resources

bio: create slab <bio-0> at 0

SCSI subsystem initialized

spi spi0.2: Warning: SPI CPHA not set: Slave Select not under software control!

See Documentation/blackfin/bfin-spi-notes.txt

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs@ffc00500, dma channel@4

bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs@ffc02300, dma channel@5

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc00700

i2c-bfin-twi i2c-bfin-twi.1: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc02200

Advanced Linux Sound Architecture Driver Version 1.0.24.

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

debug-mmrs: setting up Blackfin MMR debugfs

msgmni has been set to 101

io scheduler noop registered (default)

bf54x-lq043: FrameBuffer initializing...

dma_alloc_init: dma_page @ 0x02a74000 - 512 pages at 0x03e00000

Console: switching to colour frame buffer device 80x24

bfin-uart: Blackfin serial driver

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 48) is a BFIN-UART

bfin-otp: initialized

brd: module loaded

register bfin atapi driver

scsi0 : pata-bf54x

ata1: PATA max UDMA/66 irq 68

physmap platform flash device: 02000000 at 20000000

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x00881e

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Using buffer write method

Using auto-unlock on power-up/resume

cfi_cmdset_0001: Erase suspend on write enabled

Using physmap partition information

Creating 5 MTD partitions on "physmap-flash.0":

0x000000000000-0x000000080000 : "bootloader(nor)"

0x000000080000-0x000000480000 : "linux kernel(nor)"

0x000000480000-0x000000fe0000 : "file system(nor)"

0x000000fe0000-0x000000ff8000 : "config(nor)"

0x000000ff8000-0x000001000000 : "u-boot env(nor)"

m25p80 spi0.1: m25p16 (2048 Kbytes)

Creating 2 MTD partitions on "m25p80":

0x000000000000-0x000000080000 : "bootloader(spi)"

0x000000080000-0x000000200000 : "linux kernel(spi)"

BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices, Inc.

bf5xx-nand bf5xx-nand.0: data_width=8, wr_dly=3, rd_dly=3

ONFI flash detected

NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB 3,3V 8-bit)

Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":

ata1.00: ATA-7: FUJITSU MHW2040AT, 0000000B, max UDMA/100

ata1.00: 78140160 sectors, multi 16: LBA

0x000000000000-0x000000080000 : "bootloader(nand)"

0x000000080000-0x000000480000 : "linux kernel(nand)"

ata1.00: configured for UDMA/66

blk_queue_max_segments: set to minimum 1

scsi 0:0:0:0: Direct-Access     ATA      FUJITSU MHW2040A 0000 PQ: 0 ANSI: 5

0x000000480000-0x000010000000 : "file system(nand)"

smsc911x: Driver version 2008-10-21

sd 0:0:0:0: [sda] 78140160 512-byte logical blocks: (40.0 GB/37.2 GiB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

smsc911x-mdio: probed

smsc911x smsc911x.0: eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)

smsc911x smsc911x.0: eth0: MAC Address: 00:e0:22:fe:bd:b8

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

input: bf54x-keys as /devices/platform/bf54x-keys/input/input0

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

i2c /dev entries driver

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

bfin-ac97 bfin-ac97.0: dma rx:0 tx:1, err irq:10, regs:ffc00800

ALSA device list:

  No soundcards found.

TCP cubic registered

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting system clock to 1970-01-09 05:16:14 UTC (710174)

smsc911x smsc911x.0: eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175

IP-Config: Complete:

     device=eth0, addr=, mask=, gw=,

     host=bf548-ezkit, domain=, nis-domain=(none),

     bootserver=, rootserver=, rootpath=

sda: sda1 sda2

sd 0:0:0:0: [sda] Attached SCSI disk

Freeing unused kernel memory: 7988k freed


        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin


Have a lot of fun...



BusyBox v1.18.4 (2011-11-30 10:25:39 CST) hush - the humble shell


root:/> ^[[58;9Rversion

kernel:    Linux release 3.1.0-ADI-2012R1-pre-svn10232, build #21 Wed Nov 30 10:49:45 CST 2011

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI/svn-5686)

user-dist: release svn-10545, build #7 Wed Nov 30 10:48:58 CST 2011



STEP 3: Start testing.




root:/> twilcd_userspace_test -h

^[[58;9R TWI LCD Test Application


Usage: twilcd_test [-h?v] [-c] [-d CONTROLLER] [-p POSITION] [Message String]

        -h?            this help

        -v             print version info

        -c             Clear Display

        -d Number      use 1,2,3 for CONTROLLER 1,2,BOTH

        -p Char POS    Position where to put the string


Example: twilcd_test -p 0 "Hello World !"


Case 2 ...PASS

twilcd_userspace_test^[[58;1R -p 0 "Hello World! "

TWI LCD Test Application


Position        : 0

Message        : Hello World

Case 3 ...PASS

root:/> ^[[58;9Rtwilcd_userspace_test -p 0 "`date`"

TWI LCD Test Application


Position        : 0

Message        : Fri


The twi lcd daughter board has been switched the jumper to 9-10, but the lcd screen shows nothing.


The case is passing on bf537 and bf533 board.




--- Aaron Wu                                                 2011-12-01 06:00:43

548/527 use different TWI port comparing to BF537, update the code to support

user specify a TWI port, usage after change:

1)BF537: twilcd_userspace_test -p 0 -n 0 "8888"

2)BF548: twilcd_userspace_test -p 0 -n 1 "8888"

run twilcd_userspace_test -h for help


--- Vivi Li                                                  2011-12-12 04:17:36

OK in bf548-ezkit and bf527-ezkit.

Close it.












File Name     File Type     File Size     Posted By

config.i2c    application/octet-stream    54795    Mingquan Pan