Page 1 of 1

SPI is not working with Infineon current sensor TLI4970

Posted: Wed Jun 23, 2021 4:47 am
by ujur007
Hi,

I am working with SPI on the ESP32 Pico kit to interface the current sensor TLI4970.

I have tried like SoftSPI and SPI(HSPI & VSPI) with the configuration as shown in the example
vspi = SPI(2, baudrate=80000000, polarity=0, phase=0, bits=8, firstbit=0, sck=Pin(18), mosi=Pin(23), miso=Pin(19))
The problem is that the correct data is not being received. It is either 0xFF or 0x00. One of the things I am not quite clear is about CS pin in SPI. What I have done is that I have tried to manually turn on the pin.

I tried the same example on esp32-wroom kit with the same result.
p5 = PinPin.(5, OUT)
p5.on()

Re: SPI is not working with Infineon current sensor TLI4970

Posted: Wed Jun 23, 2021 6:11 am
by Roberthh
Usually the CS active state is a low level. p5.on() sets p5 to a high level. So better use p5.value(0) or p5(0) to set it to a low level, and p5.value(1) or p5(1) for a high level.

Re: SPI is not working with Infineon current sensor TLI4970

Posted: Fri Sep 30, 2022 9:03 am
by jcf
@ujur007
Have you got your sensor to work?
I have just now looking at a TLI4790 I had lying around and was wondering if there is a lib for it.