No SPI communication with Bosch CJ125 for LSU 4.9

Hello,

I'm trying to make a Lambda controller shield for Arduino Uno using a Bosch CJ125. I did some research and found out that some people tried (and posted here https://forum.arduino.cc/t/reading-mosi-data-from-bosch-asic/141255 )

I based my circuit on the recommended circuit from the "datasheet" and on this existing open source project (Bylund Automotive : http://www.bylund-automotive.com/research/lambda2/index.html )

For the software part, I tried using their code but I have trouble communicating with the IC.

The first thing i tried is getting the IC's identification number in order to check if i was able to read data from the chip but i got 0xFFFF (i have pulldown resistor)

So my problem is that I can't communicate with the IC using SPI, I don't have an oscilloscope but I got an FX2 clone logic analyzer and the data i'm sending is right but on the MISO line i get the same signal as my SPI clock. I checked the resistivity between the two pins and there is no short circuit.
Capture

I set the SPI divider at 128 to play safe and I put the SPI Mode to MODE1 because it was in the Bylund Automotive code (I then tried all mode when I was tinkering, and with mode2 i got some signal on MISO way later without the clock and it didn't make a lot of sense)
I also tried sending 0x0000 multiple time to wait for a response but i got none with MODE1.

Here's my schematic and my PCB board, I can upload the gerber if needed. (I made some changes with the board (jumper between the 5V from the arduino and the VCC of the chip and a jumper instead of the diode)


PCB_PCB_Bosch-LSU-4.9-Arduino-Uno-Shield-CJ125_2-V2_2024-02-03
The IC was bought on Aliexpress because it's the only way to get a CJ125, I bought 2 to be sure and I had the problem with both. I messaged the seller and he said that I was the only one having trouble with the IC.

So, am I doing something wrong or is the IC is fake and not useable ? What do you think ?

Thanks for reading !

Just a SWAG but try resetting it after the power has stablized.

I don't understand what you mean by resetting it ? Do you mean the arduino ? If yes I've done it and it didin't change anything.

I just realise I didn't post my program, sorry

#include <SPI.h>

const byte CJ125_SS_PIN = 10;
int CJ125_Status = 0;

uint16_t COM_SPI(uint16_t input) {
  SPI.setDataMode(SPI_MODE3);
  SPI.setClockDivider(SPI_CLOCK_DIV128);

  digitalWrite(CJ125_SS_PIN, LOW);
  delay(3);
  uint16_t response1 = SPI.transfer16(input);
  for (int i = 0; i < 10; i++)
  {
  uint16_t response2 = SPI.transfer16(0x00);
  }
  delay(3),
  digitalWrite(CJ125_SS_PIN, HIGH);
  

  Serial.println("Numéro d'identification : ");
  Serial.println(response1, BIN);

  return response1;
}

void setup() {
  digitalWrite(CJ125_SS_PIN, HIGH);
  Serial.begin(9600);
  SPI.begin();
  SPI.setBitOrder(MSBFIRST);
  Serial.println("Démarrage");
  
}

void loop() {
  uint16_t reponse = COM_SPI(0x4800);
  delay(5);

}

You label it CJ125_RESET it is an active low, you show it with a cap and to a pin nothing to pull it high. If left low (active condition) it will not work. Put maybe a 10K pull up if it is open.

I just tried and it didn't change anything

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.