ISL94212 Daisy chain

Hello.

I'm working on a BMS using ISL94212. It was working in stand alone configuration, but now I want to use the daisy chain to build a stack of 3 devices and I'm facing troubles. Device always respond with 0xFFFFFFFF whatever is the command, I mean identify, sleep or wakeup. Sometime the device respond 0x13380007 to a wakeup command meaning Communication failure...

I've tried to send 0xFFFFFFFF but it has no effect.

Often the DataReady Pin stay low after reading 4 bytes.

Here is an oscillo picture where yelow is SCLK, light blue is DIN, pink is DOUT and dark blue is DATAREADY.

Thank for your help.

  • I have build a pcb according to the schematic from isl94212evkit1z-user-guide.pdf file. In this schematic VC0 is not tied to Vss.
    I have correct communications with VC0 tied to Vss with a 100 homs resistors on the Master device pcb.
  • RReynard,

    Have you found the answer you were looking for?

    Mike Clements
    RenesasRulz Moderator
  • Yes. I have to put a 100 ohms resistor between VC0 and Vss.
    The circuit board is not connected to a battery stack for now, popwer supply is done with 20V from VC0 to VBat. All other battery input are floating. I'm not sure but I suspect this is the problem.
  • hey RREYNARD Have you solved your problem?

    I am also using ISL94212 with atmega2560 AVR MCU. I have successfully completed communication with single IC and now trying daisy chaining. Can you help me in code side?

    Thanks in advance

  • Yes.

    Let me know what issue you are facing.

  • i have used renesas sample code. but there is problem in SPI understanding and also delay problem in SPI daisy chaining. Chip's DRDY pin is not going low during daisy chain communication.

  • Fisrt you have to start in "Identify mode" to have a valid daisy chain.

    And SPI communication need precise timing when sending frames.

    I had many troubles to make it work correctly....

    Time betwen ~CS is low and start of transmission and between 2 frames : 

    You must insert a delay of approx 2.5us

    with a SPI clock at 1MHz

  • can you send the spi code with timing? It would be a great help.

  • Working with PIC24F16KA102...

    Warning assembly code !

    __spi_init:
    mov #0x0323,W0 ; 0000 0011 0010 0010
    mov W0,SPI1CON1 ; 8bits / Master / 1Mbps
    mov #0x0001,W0 ; Frame disabled / Buffer mode
    mov W0,SPI1CON2
    bclr SPI1STAT,#6
    bset SPI1STAT,#4
    bset SPI1STAT,#2
    bset LATB,#15
    return
    ;===========================================================================

    ;===========================================================================
    __spi_send: ; W1->data W2=byte count
    bset SPI1STAT,#15

    send_loop:
    bclr LATB,#15
    mov #3,W0 ; <<<<<
    call __pause ; // 8MHz => (3*3+1)*250ns = 2.5us
    mov.b [W1++],W0
    mov W0,SPI1BUF
    call wait_spi ; 8bits @ 1Mbps => 8us
    mov #3,W0 ; <<<<
    call __pause
    bset LATB,#15
    mov #3,W0 ; <<< CRITICAL
    call __pause ; 2.5us
    dec W2,W2
    bra NZ,send_loop
    bclr SPI1STAT,#15
    return ;
    ;===========================================================================
    __spi_receive:
    mov #3,W3
    retry:
    mov #_buffer,W1
    mov #4,W2
    call __Timer100ms

    wait_rdy:
    btss PORTA,#6
    bra data_ready
    btss IFS0,#7 ; T2IF
    bra wait_rdy

    dec W3,W3
    bra NZ,retry
    bclr T2CON,#15 ; stop timer
    bset _SysReg,#_STO
    bset _SysReg,#_ERF
    bclr SR,#1 ; time out
    return

    data_ready:
    bset SPI1STAT,#15
    bclr LATB,#15
    mov #16,W0
    call __pause
    clr W0
    mov W0,SPI1BUF
    call wait_spi
    mov #16,W0
    call __pause
    bset LATB,#15
    mov SPI1BUF,W0
    mov.b W0,[W1++]

    wait_not_rdy:
    btsc PORTA,#6
    bra wait_not_rdy

    mov #16,W0
    call __pause
    dec W2,W2
    bra NZ,wait_rdy

    bclr T2CON,#15 ; stop T2
    bclr SPI1STAT,#15
    bset SR,#1
    return
    ;===========================================================================

    wait_spi:
    bclr IFS0,#10
    wait_spi_loop:
    btss IFS0,#10
    bra wait_spi_loop
    return

    Good luck

  • Will DATA READY pin also respond during standalone operation?