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.

TSIF transmission - ATS Control with Module Initial Value

hello,

I'm using TSIF to transmit TS packet in serial sync. ( starting from the Loopback example code present in the PSP)

 

tx_cfg.if_mode = TSIF_IF_SERIAL_SYNC;
tx_cfg.clk_speed = TSIF_81_0_MHZ_SERIAL;

tx_cfg.stream_mode = TSIF_STREAM_TS;

tx_cfg.ats_mode = TSIF_TX_ATS_REMOVE;

 

 

I'm an issue regarding the TX_ATS_INIT bits in the transmit ATS initialization register.

 

I have to transmit burst of 12 TS packet ( 188*12 byte) in real time.

After every burst I reinitialize the TX_ATS_INIT bits to 0.

Sometime it seems it doesn't work properly..

 

here a piece of code:

 

...

ret = ioctl (tsif_tx_ctl_fd, TSIF_START_TX, 0);
    if (ret != 0)
        g_print ("TSIF_START_TX IOCTL Failed\n");
    else
        g_print ("TSIF_START_TX IOCTL success\n");

...

while(..)

{

            ats_counter= 0;
            ret = ioctl (tsif_tx_ctl_fd, TSIF_SET_ATS, &ats_counter);

            ...

            ret = ioctl (tsif_tx_fd, TSIF_SET_WRITE_AVAIL, &write_avail);

            ret = ioctl (tsif_tx_ctl_fd, TSIF_GET_ATS, &ats_counter);   
            printf("ats_counter = 0x%x\n",ats_counter);

            ret = ioctl (tsif_tx_fd, TSIF_WAIT_FOR_TX_COMPLETE, 0);

}

 

So, I set ATS counter to zero, start the transmission and then I read back the ats counter.

Often It is really near the zero ( due to some clock lost for ioctl call) but sometimes it is very far. So I have problems to have continuous transmission.

 

Is there any restriction on how to set the ATS counter?

 

Regards,

Claudio