ISO1H816G SPI communication problem (important)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User18668
Level 1
Level 1
Hi,

I have a ISO1H816G entegre.
I could not communicate with this device in any way.
I use the Tiva TM4C1231D6PZ as a microcontroller.
When I listen to the CS, CLK and SI pins on the oscilloscope, Looks like the following

Entegre :
https://www.infineon.com/dgdl/Infineon-ISO1H816G-DS-v02_04-EN.pdf?fileId=db3a304320d39d590120f700bb7...

CS + CLK
3955.attach
3956.attach

CS + SI
3957.attach

CODE
#include 
#include
#include "inc/hw_memmap.h"
#include "driverlib/gpio.h"
#include "driverlib/pin_map.h"
#include "driverlib/ssi.h"
#include "driverlib/sysctl.h"
#include "driverlib/uart.h"

#define NUM_SSI_DATA 1


uint32_t pui32DataTx[NUM_SSI_DATA];
uint32_t pui32DataRx[NUM_SSI_DATA];
uint32_t ui32Index;

unsigned set_bit(unsigned x, unsigned offset, bool value)
{
//dizi[5] = set_bit(dizi[5], 3, 1);

return (value)
? x | (1 << offset)
: x & ~(1 << offset);
}

int main(void){

SysCtlClockSet(SYSCTL_SYSDIV_5 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ);



SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE,GPIO_PIN_3);
GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_3 , GPIO_STRENGTH_12MA,
GPIO_PIN_TYPE_STD);
GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_3 , GPIO_PIN_3);

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOH);
GPIOPinTypeGPIOOutput(GPIO_PORTH_BASE,GPIO_PIN_5);
GPIOPadConfigSet(GPIO_PORTH_BASE, GPIO_PIN_5 , GPIO_STRENGTH_12MA,
GPIO_PIN_TYPE_STD);
GPIOPinWrite(GPIO_PORTH_BASE, GPIO_PIN_5 , GPIO_PIN_5);


SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI2);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOH);

GPIOPinConfigure(GPIO_PH4_SSI2CLK);
//GPIOPinConfigure(GPIO_PH5_SSI2FSS);
GPIOPinConfigure(GPIO_PH6_SSI2RX);
GPIOPinConfigure(GPIO_PH7_SSI2TX);

// Configure the GPIO settings for the SSI pins. This function also gives
// control of these pins to the SSI hardware. Consult the data sheet to
// see which functions are allocated per pin.
// The pins are assigned as follows:
// PH7 - SSI2Tx
// PH6 - SSI2Rx
// PH5 - SSI2Fss
// PH4 - SSI2CLK

GPIOPinTypeSSI(GPIO_PORTH_BASE, GPIO_PIN_7 | GPIO_PIN_6 |
GPIO_PIN_4);

SSIConfigSetExpClk(SSI2_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_2,
SSI_MODE_MASTER, 1000000, 8);

SSIEnable(SSI2_BASE);

while(1){

pui32DataTx[0] = set_bit( pui32DataTx[0],0,1);
pui32DataTx[0] = set_bit( pui32DataTx[0],1,0);
pui32DataTx[0] = set_bit( pui32DataTx[0],2,0);
pui32DataTx[0] = set_bit( pui32DataTx[0],3,0);
pui32DataTx[0] = set_bit( pui32DataTx[0],4,0);
pui32DataTx[0] = set_bit( pui32DataTx[0],5,0);
pui32DataTx[0] = set_bit( pui32DataTx[0],6,0);
pui32DataTx[0] = set_bit( pui32DataTx[0],7,1);

GPIOPinWrite(GPIO_PORTH_BASE, GPIO_PIN_5, GPIO_PIN_5);
GPIOPinWrite(GPIO_PORTH_BASE, GPIO_PIN_5, !GPIO_PIN_5);

for(ui32Index = 0; ui32Index < NUM_SSI_DATA; ui32Index++)
{
SSIDataPut(SSI2_BASE, pui32DataTx[ui32Index]);
}


while(SSIBusy(SSI2_BASE))
{

}
GPIOPinWrite(GPIO_PORTH_BASE, GPIO_PIN_5, GPIO_PIN_5);

}
}


Where exactly is the problem ?
0 Likes
6 Replies
User18668
Level 1
Level 1
There are no authorized people in this forum
0 Likes
User270
Level 5
Level 5
5 solutions authored First solution authored
The SPI Mode of the ISO1H816G as SPI slave is Mode=2. MSB first, SCLK idle = High. At CS# = Low -> SO data out on falling edge of clock, SI data in on rising edge of the clock.

The description of communication covering SPI interface is in chapter 3.5 of datasheet, moreover chapter 4.8 is covering the timing data for the signals.
To transfer the information of what output has to be switched on is needed to send a 8 bit sequence with 0 or 1 for off or on status for the 8 channels.
0 Likes
User18668
Level 1
Level 1
Hi forix,

I don't think there's anything wrong with the Times.
Can you tell me where the" DIAG " pin should be? ( HIGH - LOW )
I'm throwing you Oscilloscope Pictures again

TX DATA = 0xFF

3952.attach
-------------------------------------------------------------
3953.attach

Can you send me the code you burned 1 ledi if you have it?
I'm curious about the value sending structure.


pui32DataTx[0] = set_bit( pui32DataTx[0],0,1);
pui32DataTx[0] = set_bit( pui32DataTx[0],1,1);
pui32DataTx[0] = set_bit( pui32DataTx[0],2,1);
pui32DataTx[0] = set_bit( pui32DataTx[0],3,1);
pui32DataTx[0] = set_bit( pui32DataTx[0],4,1);
pui32DataTx[0] = set_bit( pui32DataTx[0],5,1);
pui32DataTx[0] = set_bit( pui32DataTx[0],6,1);
pui32DataTx[0] = set_bit( pui32DataTx[0],7,1);

GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3 , GPIO_PIN_3); // CS = ON
GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3 , !GPIO_PIN_3); // CS = OFF

for(ui32Index = 0; ui32Index < NUM_SSI_DATA; ui32Index++)
{
SSIDataPut(SSI0_BASE, pui32DataTx[ui32Index]); //Data Put
}
while(SSIBusy(SSI0_BASE))
{
}
GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3 , GPIO_PIN_3); //CS=ON


Thanks for the answer.
0 Likes
User270
Level 5
Level 5
5 solutions authored First solution authored
The output pin DIAG# provides an open drain functionality. A current source is also connected to the pin DIAG#. In normal operation the signal DIAG is high. When overtemperature or Vbb below ON-Limit is detected the signal DIAG changes to low.
Looking to the oscillograms: Are the channel settings for the amplitudes correct? Signal TX is below 1V ? Anyway the quality of the signal clock is bad. You may use 10k pullups for the SPI pins CLK, SI and SO to have better view on th scope.

For seeing the shift out and sample in of the data a screenshot of clock together with SI or SO will better show what is happening.
0 Likes
User18668
Level 1
Level 1
My DIAG pin is in a constant low position, but there's no heating or voltage issues.
Write me the data structure I need to send ISO1H816G or the HEX character I need to send.
If you have used this entegre before, you can write the sample code or structure.
0 Likes
User270
Level 5
Level 5
5 solutions authored First solution authored
DIAG# pin has a pullup resistor? VCC is 3.3V Can you please comment on the osci screenshots and signal levels? The TAB is connected to Vbb? Vbb is > 11V? The two voltage domains VCC and VBB are isolated from each other?
0 Likes