cancel
Showing results for 
Search instead for 
Did you mean: 

Steps or procedure for SPI connection between AEK-POW-BMSCCTX and Raspberry pi. and further get cell parameters

Amal_V
Associate

Hi Team,

I am trying to communicate with my bms using raspberry pi.

I am using 8 cells in series connected to AEK-POW-BMSCCTX from C0 to C8 (from cell taps-P1 connecter). From the P4 side VIO-3V, Vdd- 5v, GND. I have also connected the MISO,MOSI,CS and CLK of the pi with corresponding pins in bms. Also TXEN-high, DIS-low, BNE-low.

Using this run a sample Spi code and there is no correct reply. I just need to know is this connections correct? any extra connections do i have to do?

Also after connections, D9,D8 and D2 leds of my bms is light up. When spi is activated D7 led should blink but not in my setup. I hope i get this problem solved.

Hardware we’re using now

  • 1× AEK-POW-BMSCCTX (one node powered with 8 cells for bring-up).

  • Raspberry Pi with /dev/spidev0.0 enabled.

  • Cell stack: C0..C8 populated (8 cells ≈ 26 V).
    Two GND_EXT pins tied to pack negative as per BMS hold manual.


    Actual wiring (current)

    P1 (cells)

    • C0–C8 → 8 cell taps (≈ 26 V total)

    • GND_EXT(×2) → pack negative

    P4 (logic, to Raspberry Pi)

    • SDO (P4-2)MISO (Pi GPIO9, pin 21)

    • GND_BMS GND (Pi)

    • SCK (P4-4)SCLK (Pi GPIO11, pin 23)

    • SDI (P4-6)MOSI (Pi GPIO10, pin 19)

    • NCS (P4-8)BCM5 (Pi pin 29) — we drive chip-select manually via GPIO (not CE0/CE1)

    • VDD → tried 5 V initially; for bring-up we now use/recommend 3.3 V

    • VIO → 3.3 V

    • GND (shield ground) → GND (Pi)

    Discrete enable pins (loose wires from P4 area)

    • DISGND (LOW)

    • TXEN3.3 V (HIGH)

    • NSLAVE → (important) should be GND (LOW) so L9963T behaves as an SPI slave. (But as per the datasheet it is grounded)

       

    LED states observed


    • With VDD/VIO applied and TXEN high: D2 and D9 green; D8 blue.

    • When DIS was grounded, D6 (red) turned off. (Previously red when DIS floated.)

Software & tests I already ran

  • Verified Pi SPI by shorting MOSI↔MISO: loopback OK.

  • Could not get a response from BMS with stock CE0/CE1; switched to manual chip-select on GPIO5 using libgpiod.

  • I send one 10-byte transfer per command (5-byte frame + 5 dummy) so /CS stays low for all 40 clocks.

  • SPI settings tried: mode 1 (CPOL=0, CPHA=1) primarily; also tested mode 0. Speeds 100 kHz → 10 kHz → 5 kHz → 2 kHz.

  • Frames built per L9963E: top-33 bits + CRC-6 (poly 0x2D, seed 0x38).
    Examples we send (TX prints confirmed non-zero on wire):

    • ISO_INIT: C0 04 00 20 3D

    • SET_ID (broadcast chip_ID=1): C0 04 10 20 15

    • VERIFY (read DEV_GEN_CFG @ DevID=1): 82 04 00 00 3A

  • I also wired BNE → GPIO25 and printed BNE level before/after each frame.

Results

  • TX is non-zero and /CS is asserted correctly (manual GPIO).

  • RX remains 00 00 00 00 00 and BNE never rises — i.e., L9963T/E rejects our frames (no reply queued).


I request help for the current problem from experts. Let me know any missing factors or connections i need to follow. Any corrections in the software part is much appreciated

Thank You.

1 REPLY 1
SRomeo
ST Employee

Hi there,
Regarding the connection, here follows a scheme for a "2 nodes BMSCCTX/BMSCC implementation using AEK-MCU-C4MINI"

SRomeo_0-1763644364737.png

 

Anyway,
we cannot give support on Raspberry/Python implementations.

L9963E (BMSCCTX's core IC) may be drived via AutoDevKit BMS APIs, so you should study on your own how to port AutoDevKit C examples and libraries into Python.

Best regards,
AEK_Team