This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TSER953: Adding pwm output support for tser953

Part Number: TSER953
Other Parts Discussed in Thread: TDES954

 def ti954_init_serdes(self):
        """Initialize SerDes configuration"""
        try:
            # Reset deserializer digital block
            self.deser_regmap.write(TI954_RESET, 0x03)
            time.sleep(2.0)  # 2000ms delay
            
            # Write Enable for RX port 0 registers
            self.deser_regmap.write(0x4C, 0x03)
            
            # Enable I2C Pass-Through, BC = 50Mbps
            self.deser_regmap.write(0x58, 0x5E)
            
            # Set Alias for AR1044 Camera
            self.deser_regmap.write(0x5D, 0x20)
            self.deser_regmap.write(0x65, 0x20)
            
            # Enable CSI output
            self.deser_regmap.write(0x32, 0x01)
            
            # Enable CSI output with non-continuous clock, 2 lanes
            self.deser_regmap.write(0x33, 0x21)
            
            # Forwarding enabled for RX Port 0
            self.deser_regmap.write(0x20, 0x20)
            
            # Read and log RX_PORT_STS1
            val = self.deser_regmap.read(TI954_RX_PORT_STS1)
            self.logger.info(f"954 RX_PORT_STS1: 0x{val:02x}")
            
            # Set SerAlias address
            self.deser_regmap.write(TI954_SLAVE_ID0, self.ser_alias_addr << 1)
            
            # Read and log serializer GENERAL_STATUS
            val = self.ser_regmap.read(TI953_GENERAL_STATUS)
            self.logger.info(f"953 GENERAL_STATUS: 0x{val:02x}")
            
            # Configure serializer: 2 lanes, CRC enable, 1.8V I2C
            self.ser_regmap.write(0x02, 0x13)
            
            return 0
            
        except Exception as e:
            self.logger.error(f"Error in ti954_init_serdes: {e}")
            return -1
    
    def ti954_init_gpio_hw(self):
        """Initialize GPIO hardware configuration"""
        try:
            # Initialize GPIO 0 hardware
            # Enable output for GPIO4
            self.deser_regmap.write(0x0F, 0x6F)
            
            # Set output source of DES GPIO4 to be GPIO2 on the serializer at RX Port 0
            self.deser_regmap.write(0x14, 0x41)
            
            # Configure all GPIOs from Ser to be remote from Deser
            self.ser_regmap.write(0x0D, 0xF0)
            
            # Set GPIO1 and 3 Direction Output
            self.ser_regmap.write(0x0E, 0xA5)
            
            # Commented out alternative configuration:
            # self.ser_regmap.write(0x0E, 0x2D)
            
            self.ser_regmap.write(0x33, 0x07)
            
            # Commented out placeholder configurations:
            # self.deser_regmap.write(0x10, 0x6F)  # GPIO 1 enable
            # self.deser_regmap.write(0x15, 0x41)  # GPIO 1 source
            
            # Initialize both GPIO states to LOW
            self.gpio_state[0] = 0
            self.gpio_state[1] = 0
            
            return 0
            
        except Exception as e:
            self.logger.error(f"Error in ti954_init_gpio_hw: {e}")
            return -1

 

the python code is the initilization for serdes, but we want one of the gpio outputs on the serializer to output a pwm signal to control LED brightness, is there a configuration that allows pwm duty cycle control, the frequency is not too important.

  • Hi Anthony,

    We do not have a direct PWM control for the GPIOs on the TSER953. We do offer a programmable FrameSync generator which may be useful for this application if not already being used for your image sensor. Details on the frame sync generator and programming are shared in the TDES954 datasheet: 7.4.27.2 Internally Generated FrameSync

    FrameSync duty cycles are controlled via the FS_HIGH_TIME_x and FS_LOW_TIME_x controls.

    Best,

    Zoe