Skip to main content
Rookie38
Associate III
January 27, 2021
Question

How to read DEVCFG0 Register of LED7708 Driver

  • January 27, 2021
  • 1 reply
  • 501 views

According to the data sheet of the LED7708 it is not clear to me how to read the DEVCFG0 register. Since the bits OVFW, OTAF, OCAD, SCAD, contain status messages, I would like to be able to determine the cause of a fault. The firmware of the STEVAL ILL035V1 shows the following example:

//==============================================================================
// This routine sends a 16-bit word to the device
// and returns the rolled out value
//==============================================================================
u16 Write_16(u8 Destination, u16 Data_to_Send)
{
 
 int i; 
 u16 flag, Mask; 
 u16 Received_Data=0;
 int ReceivedStream[Max_Packet_Lenght];
 
 GPIO_ResetBits(GPIOB, BUSY); // Busy LED on
 Mask=0x8000;
 Received_Data=0;
 
 for(i=1; i<=16; i++)
 { // number of bits
 
 flag = Data_to_Send&Mask; 
 if(flag)
 {
 GPIO_SetBits(GPIOA, SDO); // SDO high 
 GPIO_SetBits(GPIOA, SCK); // SCK high 
 if(GPIO_ReadInputDataBit(GPIOA, SDI))
 {
 Received_Data=Received_Data|Mask; 
 ReceivedStream[i] = ReceivedStream[i]|Mask;
 ReceivedStreamNEW[i] = Received_Data;
 }
 GPIO_ResetBits(GPIOA, SCK); // SCK low 
 }
 else
 { 
 GPIO_ResetBits(GPIOA, SDO); // SDO low 
 GPIO_SetBits(GPIOA, SCK); // SCK high
 if(GPIO_ReadInputDataBit(GPIOA, SDI)) 
 {
 Received_Data=Received_Data|Mask; 
 ReceivedStream[i] = ReceivedStream[i]|Mask;
 ReceivedStreamNEW[i]=Received_Data;
 }
 GPIO_ResetBits(GPIOA, SCK); // SCK low 
 }
 
 if(Destination!=0)
 {
 if (i==(16-Destination)) 
 {
 GPIO_SetBits(GPIOA, GPIO_Pin_4); //LE high
 }
 if (i==16) 
 { 
 GPIO_ResetBits(GPIOA, GPIO_Pin_4); //LE low
 }
 }
 Mask=Mask/2;
 }
 GPIO_SetBits(GPIOB, BUSY); // Busy LED off
 return(Received_Data);
}

Based on the latch, the operations on the LED driver are distinguished. How is distinguished whether DEVCFG0 or DEVCFG1 is written/read?

This topic has been closed for replies.

1 reply

Rookie38
Rookie38Author
Associate III
February 1, 2021

In the meantime I was able to port the 16x12 bit mode successfully.

The 1x192-bit or 1x256-bit mode, which continuously sends back the status of all registers, unfortunately does not work. There is also no complete example from ST for this mode. Does nobody have any experience with this LED chip?