PicoMOD 7A freezes with I2C Error "NI2C: Failed to wait for 'not busy'"

  • Hello,


    we are using several PicoMOD 7A, which are suddenly freezing after minutes, hours or days.
    Freezing means that the device is not pingable anymore. There is no reaction of the device in any way.


    The last line of the logfile is: NI2C: Failed to wait for 'not busy'(iicstat=b1)
    After this thera are only a lot of dots ".".


    As attachment you can find the logfile we recorded on the serial interface with putty.
    Due to upload restrictions (1MB max) I removed a large numer of dots "." at the end of the file.


    Regards
    ITR

  • the application "EVG.Embedded.WinCE.UI.Lamphouse.exe" is throwing a "Data Abort" exception, this means an access to a memory region not allocated by the application occurs. Please check, if all pointers are valid.
    This error should be removed first, then check if the error still occurs.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    thank you for your response.


    The PicoMOD 7A is also freezing with no data abort exceptions in the log.
    We see this with CE6 Firmware version V1.10 and V1.11.


    Whats are possible reasons for NI2C: Failed to wait for 'not busy'?

  • V1.10 Log:


    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2017.03.15 09:27:08 =~=~=~=~=~=~=~=~=~=~=~=

    Microsoft Windows CE Ethernet Bootloader Common Library Version 1.1 Built Nov 19 2014 15:45:58
    Microsoft Windows CE Bootloader for PicoMOD7A Built Nov 19 2014
    Portions copyright (c) 2012 F&S Elektronik Systeme GmbH
    Boot Loader, Version 1.14
    NBoot, Version VN20
    HW rev. 1.0


    HW-Watchdog: ON
    System ready!
    Preparing for download...
    Press >S< to step into monitor...
    AUTO BOOT enabled
    Kernel (3070kB) read from flash disk started finished in 727 milliseconds
    INFO: OEMLaunch: Jumping to Physical Address 0x4002BE8Ch (Virtual Address 0x0h)...



    Windows CE Kernel for ARM (Thumb Enabled) Built on Mar 8 2013 at 17:05:33
    [OAL] ++OEMInit()
    INFO:OALLogSetZones: dpCurSettings.ulZoneMask: 0xb
    OAL Log enable : 1
    OAL Log mask : 3


    ******** System Clock Info **********
    [OAL] APLL_CLK : 1000000000 Hz
    [OAL] MPLL_CLK : 667000000 Hz
    [OAL] EPLL_CLK : 96000000 Hz
    [OAL] VPLL_CLK : 54000000 Hz


    [OAL] ARM_CLK : 1000000000 Hz
    [OAL] HCLK_MSYS : 200000000 Hz
    [OAL] PCLK_MSYS : 100000000 Hz
    [OAL] HCLK_DSYS : 166750000 Hz
    [OAL] PCLK_DSYS : 83375000 Hz
    [OAL] HCLK_PSYS : 133400000 Hz
    [OAL] PCLK_PSYS : 66700000 Hz
    ******** System Clock Info **********


    ******** NKForceCleanBoot Change for Release **********


    OEM:-------------------------------------------
    OEM: Normal Boot!!
    OEM:-------------------------------------------


    PicoMOD7A V1.10 - Firmware Init
    Copyright (c) 2012 F&S Elektronik Systeme GmbH
    Build: Mar 25 2015/14:14:43
    HW-WATCHDOG: ENABLED
    FMD: NAND ID:0xf192 --> EON: 1GBit (128MB)
    FMD: Block 0 to 6 are locked for boot loader
    [OAL] MACB: Disabled
    [OAL] TVOUT: Disabled
    [OAL] RestartReason: Reset
    [OAL] VidMemBase: 0x4f000000
    FMD: NAND ID:0xf192 --> EON: 1GBit (128MB)
    FMD: Block 0 to 6 are locked for boot loader
    FSPART: FS partition driver loaded
    BINFS: RegisterVolume - Mounted volume '\BINFS'
    PM-NETDCU: STARTED
    BE2: Version 1.2, ActiveKey = Drivers\Active\01
    DMSG: DrvWAITInitialize
    PWC: Version 1.0, ActiveKey = Drivers\Active\02
    PSS: Version 1.1, ActiveKey = Drivers\Active\09
    CAM:Version 1.5, ActiveKey = Drivers\Active\10
    CAM:Version 1.5, ActiveKey = Drivers\Active\11
    CAM:Version 1.5, ActiveKey = Drivers\Active\12
    PIF: Version 1.0, ActiveKey = Drivers\Active\15
    OALIntrEnableIrqs -> VirtualIRQ=147 PhysicalIRQ=30
    OALIntrEnableIrqs -> VirtualIRQ=147 IRQ_GPJ3_INT3=147
    AX88796: Version 01.06, ActiveKey = Comm\ETHNETA
    AX88796:Debug = 0xffffffff
    AX88796:BusType = 0x0
    AX88796:MaxMulticastList = 0x8
    AX88796:Send Mode = 0x1
    AX88796:Speed & Duplex = 0x3100
    AX88796:FIFOOffset = 0x40
    AX88796:VLAN = 0x0
    AX88796:VLAN ID = 0x00
    AX88796:Wake Up Setting is = 0x0
    AX88796:Flow Control = 0xc7
    AX88796:Registering adapter # buffers = 12
    AX88796:Bus type = 0
    AX88796:I/O base addr = 0x80000000
    AX88796:interrupt number = 10
    AX88796:max multicast 8
    Page 0 - Reg. 0x0 = 0x3
    Page 0 - Reg. 0x1 = 0x4C
    Page 0 - Reg. 0x2 = 0x80
    Page 0 - Reg. 0x3 = 0x4C
    Page 0 - Reg. 0x4 = 0x0
    Page 0 - Reg. 0x5 = 0x0
    Page 0 - Reg. 0x6 = 0x4D
    Page 0 - Reg. 0x7 = 0x0
    Page 0 - Reg. 0x8 = 0x8
    Page 0 - Reg. 0x9 = 0x0
    Page 0 - Reg. 0xa = 0xFF
    Page 0 - Reg. 0xb = 0xFF
    Page 0 - Reg. 0xc = 0x0
    Page 0 - Reg. 0xd = 0x0
    Page 0 - Reg. 0xe = 0x0
    Page 0 - Reg. 0xf = 0x0
    Page 1 - Reg. 0 = 43
    Page 1 - Reg. 1 = 0
    Page 1 - Reg. 2 = 5
    Page 1 - Reg. 3 = 51
    Page 1 - Reg. 4 = B
    Page 1 - Reg. 5 = E
    Page 1 - Reg. 6 = F2
    Page 1 - Reg. 7 = 4D
    Page 1 - Reg. 8 = 0
    Page 1 - Reg. 9 = 0
    Page 1 - Reg. 10 = 0
    Page 1 - Reg. 11 = 0
    Page 1 - Reg. 12 = 0
    Page 1 - Reg. 13 = 0
    Page 1 - Reg. 14 = 0
    Page 1 - Reg. 15 = 0
    Page 1 - Reg. 0x10 = 0x0
    Page 1 - Reg. 0x11 = 0x0
    Page 1 - Reg. 0x12 = 0xC
    Page 1 - Reg. 0x13 = 0x12
    Page 1 - Reg. 0x14 = 0x47
    Page 1 - Reg. 0x15 = 0x23
    Page 1 - Reg. 0x16 = 0x15
    Page 1 - Reg. 0x17 = 0x10
    Page 1 - Reg. 0x18 = 0x0
    Page 1 - Reg. 0x19 = 0x6
    Page 1 - Reg. 0x1a = 0xC7
    Page 1 - Reg. 0x1b = 0xA0
    Page 1 - Reg. 0x1c = 0x0
    Page 1 - Reg. 0x1d = 0x0
    ENC624J600: Version 01.01, ActiveKey = Comm\ETHNETNR
    AX88796: Version 01.06, ActiveKey = Comm\ETHNETB
    AX88796: Controller not found
    BE2: Version 1.2, ActiveKey = Drivers\Active\19
    I2C: Version 4.2, ActiveKey = Drivers\Active\20
    I2C: Version 4.2, ActiveKey = Drivers\Active\21
    NI2C: Version 3.3, ActiveKey = Drivers\Active\22
    NI2C: Priority256 = 0x00000067 = 103 (Default)
    NI2C: ClockFreq = 0x000249f0 = 150000
    NI2C: DeviceArrayIndex = 0x00000002 = 2
    NI2C: IntPullUp = 0x00000000 = 0 (Default)
    NI2C: DrvStrength = 0xffffffff = 4294967295 (Default)
    NI2C: Using controller I2C2
    NI2C2: GPD1CON=0x00220000
    NI2C2: GPD1PUD=0x000000AA
    NI2C2: GPDDRV=0x00000000
    NI2C2: Requested 150000Hz, using nearest possible clock frequency 130273Hz
    NI2C2: Interrupt service thread ID: 0x03400002
    SDMMC2: Version 1.7, ActiveKey = Drivers\Active\23
    CID: Version 2.15, ActiveKey = Drivers\Active\24
    SDMMC2: Card inserted!
    WAV: Version 2.3, ActiveKey = Drivers\Active\25
    SDMMC2: HandleErrors - CMD Timeout Error...
    NI2C2: Idle Timeout(0)
    UART: Version 1.4, Key = Drivers\Active\26
    UART: Version 1.4, Key = Drivers\Active\27
    CMM: Version 1.3, ActiveKey = Drivers\Active\28
    SDMMC0: Version 1.7, ActiveKey = Drivers\Active\29
    SDMMC0: Card inserted!
    SDMMC0: HandleErrors - CMD Timeout Error...
    NI2C2: Idle Timeout(1)
    MFC: Version 1.0, ActiveKey = Drivers\Active\43
    MFC power on
    MFC power off
    JPEG: Version 1.0, ActiveKey = Drivers\Active\46
    BCS: Version 1.2, ActiveKey = Drivers\Active\47
    DIO: Version 2.7, ActiveKey = Drivers\Active\48
    OHCI: Version 1.0, ActiveKey = Drivers\BuiltIn\OHCI
    FRW: Version 1.0, ActiveKey = Drivers\Active\51
    LCD: Version 1.9, ActiveKey = Drivers\Display\LCD
    LCD: Read registry settings from Drivers\Display\LCD
    LCD: Display-Mode 100, Name UMSH-8376MD-2T
    TCHPDD: Version 1.8, Key = HARDWARE\DEVICEMAP\TOUCH
    TCHKEY: Version 1.0, Key = HARDWARE\DEVICEMAP\TOUCH\VirtualKeys
    NI2C2: Idle Timeout(2)
    CheckAutoStart: Version 1.5, LaunchNum = 100
    NI2C2: Idle Timeout(3)
    NI2C2: Idle Timeout(4)
    NI2C2: Idle Timeout(5)
    NI2C2: Idle Timeout(6)
    NI2C2: Idle Timeout(7)
    NI2C2: Idle Timeout(8)
    NI2C2: Idle Timeout(9)
    NI2C2: Idle Timeout(10)
    NI2C2: Idle Timeout(11)
    NI2C2: Idle Timeout(12)
    NI2C2: Idle Timeout(13)
    NI2C2: [18129] 0xd64c9e40: Device opened
    *************************************************************************
    AX88796:Ne2000CheckforHang I/O port: 0x80000000
    AX88796:Ne2000CheckforHang GPI = 0x17
    AX88796:Ne2000CheckforHang TCR = 0x80
    AX88796:Ne2000CheckforHang RCR = 0x4c
    [AX88796] EINT10 = GPH1_2 = 0xf (GPH1CON = 0xff0)
    [AX88796] GPH1DAT = 0x6
    [AX88796] GPH1PUD = 0x5569
    [AX88796] BTCR = 23
    *************************************************************************


    ####### Minutes or Hours goes by


    *************************************************************************
    AX88796:Ne2000CheckforHang I/O port: 0x80000000
    AX88796:Ne2000CheckforHang GPI = 0x17
    AX88796:Ne2000CheckforHang TCR = 0x80
    AX88796:Ne2000CheckforHang RCR = 0x4c
    [AX88796] EINT10 = GPH1_2 = 0xf (GPH1CON = 0xff0)
    [AX88796] GPH1DAT = 0x6
    [AX88796] GPH1PUD = 0x5569
    [AX88796] BTCR = 23
    *************************************************************************
    NI2C: Failed to wait for 'not busy'(iicstat=b1)
    ............................................................................................

  • Hello,

    Quote

    NI2C: Failed to wait for 'not busy'(iicstat=b1)

    This indicates that the I2C stop signal is not appeared. I assume SDL or SDA or both are low! I also await that the line(s) hold down by the slave. What happen if you disconnect the slave - the line(s) are still hold down?
    Try shorter pull-ups and/or lower frequency.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • I work in the same company with ITR - and we have serious problems with the I2C driver!!


    We using the analog IC MAX127 from maxim.
    The driver is version 3.3: NI2C: Version 3.3, frequency is set to 150000 in registry
    Kernel is WinCE6 1.11.


    I have written a test routine like this:


    This will result to these messages on the I2C bus (log is done with I2C bus sniffer):


    But sometimes (after 1 - 10 minutes) the driver is NAK the first readed byte:

    Code
    1. [22/05/17 - 12:30:43:523] s28wa88ap
    2. [22/05/17 - 12:30:43:523] s28ra00n00n


    This error happens randomly on any channel. The problem is that this error will completely freeze the PicoMOD7A and only a power cycle will resolve the error!!


    Here a picture of a working transmition:
    [IMG:https://s1.postimg.org/npn0w6qtb/scope_47.png]bild upload


    And here where the first byte got NAK by the MASTER!!:
    [IMG:https://s1.postimg.org/l2cf5j00v/scope_46.png]fotos kostenlos


    And another:
    [IMG:https://s2.postimg.org/eqare63g9/scope_48.png]bilder kostenlos


    We need asap a solution for this driver problem!!!

  • Hello


    do you see this message "Failed to wait for 'not busy'..." while adjust "Debug=DWORD:4" for the NI2C driver?


    We can't offer a fast solution because we need HW and SW to reproduce it.


    Fastest way you can check for resolution is to disable/overwrite NI2C and register Soft I2C (fs_i2c.dll) for this pins (no code changes required, refer NI2C and IC2 Docs). Disadvantage is higer CPU load and lower data clock.
    Following should work:
    HKEY_LOCAL_MACHINE\drivers\builtin\picomod7a\i2c1
    "PinSCL"=dword:12
    "PinSDA"=dword:11
    "Dll"=string:fs_i2c.dll

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Yes we see the "Faild to wait for 'not busy'" and a endless loop with "." on the debug COM port when using the fs_ni2c.dll.
    The error happens between 5 minutes and 48 hours.


    By using the Software I2C driver (fs_i2c.dll) the problem is gone.
    Also with higher clock rate than before was used - no problems.


    We are using the PicoMOD7A since 01/2014 and had no problems.
    The problems where starting in the last 6-12 months.
    The last oder was around 03-12/2016.


    So was there anything changed on the hardware I2C interface?


    We already ordered the PicoMODA9 and this version should be onside in ~2 weeks.
    Is on the PicoMODA9 the same I2C hardware interface used as on the PicoMOD7A?

  • Hello,


    HW I2C is part of the CPU and the pins are direct connected to CPU.
    So i have no explanation for the above outlined behavior.
    Did the problem disappear when you test with additional pull-ups in the I2C lines?


    PicoCOM9 has other CPU as PicoMOD7A but user I2C interfas is the same.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.