This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I2C enable interrupts for DM388

Hi All,

I am working on DaVinci DM388 processor , ipnc_rdk 3.80.00  and configuring it as I2C slave device.

How linux informs  that it is now being accessed.as I2C salve ?

Should it have to generate interrupt ?

For interrupt method i have to  enable software interrupts for I2C ( I2CINT2 with no 30 ) .I have a memory dump utility that gives register configuration.


I have to take dump of Interrupt controller registers but  some of it's registers gives error and some are properly accessed. I named those register in logs .

Can any one help me on resolving that ? Why it gives error for that registers. ?

Interrupt controller base address is 0x4820_0000 and by memory dump utility ,it gives error for some registers as follows:

error for Revision Identification Register. 0x48200000

root@DM385_IPNC: /md 0x48200000
48200000: 000000Unhandled fault: external abort on non-linefetch (0x1018) at 0x4000504c
50 00000000 00000000 00000000    P...............
48200010: 00000001 00000001 00000000 00000000    ................
48200020: 00000000 00000000 00000000 00000000    ................
48200030: 00000000 00000000 00000000 00000000    ................
Bus error


root@DM385_IPNC:~# /md 0x48200040
Unhandled fault: external abort on non-linefetch (0x1018) at 0x4009104c
Bus error

40h                 INTCPS_SIR_IRQ            Spurious IRQ Flag Register
44h                 INTCPS_SIR_FIQ             Spurious FIQ Flag Register
48h                 INTCPS_CONTROL         Control Register
4Ch                 INTCPS_PROTECTION   Protection Mode Register

root@DM385_IPNC:~# /md 0x48200050
48200050: 00000000 00000000 00000000 00000000    ................
48200060: 00000000 ffffffc0 000000ff 00000000    ................
48200070: 00000000 00000000 00000000 00000000    ................
48200080: 00000502 efe9afef 00000000 00000000    ................
48200090: 00000000 00000000 00000000 00000000    ................
482000a0: 00000000 bffff0be 00000000 00000000    ................
482000b0: 00000000 00000000 00000000 00000000    ................
482000c0: 00000000 ffffc0b6 00000000 00000000    ................

Best regards,

Hardik Patel.

  • Hi ,
    These register are accessed through Supervisor mode.

    Does any one knows how to switch to Supervisor mode ?

    Thanks,
    Best Regards,
    Hardik Patel
  • Hardik,

    In u-boot, use md command. In u-boot, you are in supervisor/privileged mode by default. In user space, use devmem2 tool.

    Make sure also you have enabled the clock signal from the device PRCM to the I2C module instances, before using the md/devmem2. You should write 0x2 in registers like:
    CM_ALWON_I2C_0_CLKCTRL[1:0] MODULEMODE = 0x2, enable I2C0 and I2C2
    CM_ALWON_I2C_1_CLKCTRL[1:0] MODULEMODE = 0x2, enable I2C1 and I2C3

    Regards,
    Pavel