STP16CPC26 won't do anything
My apologies if this is the wrong ST forum... it seemed like the closest one to the part I'm using.
I have a new STM32F072 board design that has a STP16CPC26 LED driver connected to one of SPI busses. I just could not get the chip to do anything using the SPI bus, so I switched to a dirt-simple bit-banged (temporary, throw-away) driver so that I could easily change any aspect of the timing to make the chip work. Same problem... no matter what I do none of the outputs ever turn on and the SDO output stays low all the time. I've used a DMM to ensure it's properly connected to power and ground and that the supply voltage is okay (it's at 3.3V). I've had 3 other embedded developers look at the scope traces of the SDI, CLK, LE and OE- signals and they all agree that the timing and sequencing matches what the datasheet says you have to do to make the part work, but... it acts like it's dead. I've tried 5 different boards, and none of the outputs on any of them ever change state. I've also verified that the rise time of the SCLK signal is okay. Here's the bit-banged driver code. Can anyone suggest me to anything to do differently to make the part work? Does anyone know if there are any counterfeit STP16CPC26 chips in the supply chain? Any help would be appreciated.
void delay() {
systick timer = TimerGet();
while (TimerElapsed(timer) < 1)
;
}
void LEDs() {
static uint32_t value = 0x55555555;
delay();
OUT_EN = 1;
delay();
LATCH_EN = 0;
delay();
for(int i = 0; i < 16; i++) {
delay();
SPI_LED_MOSI = (value & BIT(i)) ? 1 : 0;
delay();
SPI_LED_SCLK = 1;
delay();
SPI_LED_SCLK = 0;
}
LATCH_EN = 1;
delay();
LATCH_EN = 0;
delay();
OUT_EN = 0;
delay();
value ^= 0xFFFFFFFF;
}

