2009-09-22 02:40:58 SPORT error - TUVF, somebody help me ~
steven O (AFGHANISTAN)
Message: 80216
as topic, i used the sport1 in multichannel operation mode and the copnfiguration as following :
*((volatile unsigned short *) SPORT1_TCR1) &= ~TSPEN;
*((volatile unsigned short *) SPORT1_RCR1) &= ~RSPEN;
*((volatile unsigned short *) SPORT1_TCR1) = 0x0000;
*((volatile unsigned short *) SPORT1_TCR2) = 0x0007;
*((volatile unsigned short *) SPORT1_RCR1) = 0x0000;
*((volatile unsigned short *) SPORT1_RCR2) = 0x0007;
*((volatile unsigned short *) SPORT1_MCMC1) = 0x3000;
*((volatile unsigned short *) SPORT1_MCMC2) = 0x001c;
*((volatile unsigned int *) SPORT1_MTCS0) = 0xffffffff;
*((volatile unsigned int *) SPORT1_MTCS1) = 0x000000000;
*((volatile unsigned int *) SPORT1_MTCS2) = 0x000000000;
*((volatile unsigned int *) SPORT1_MTCS3) = 0x000000000;
*((volatile unsigned int *) SPORT1_MRCS0) = 0xffffffff;
*((volatile unsigned int *) SPORT1_MRCS0) = 0x000000000;
*((volatile unsigned int *) SPORT1_MRCS0) = 0x000000000;
*((volatile unsigned int *) SPORT1_MRCS0) = 0x000000000;
*((volatile unsigned short *) DMA3_CONFIG) = 0x0000;
*((volatile unsigned short *) DMA4_CONFIG) = 0x0000;
SSYNC();
if (request_irq(IRQ_SPORT1_TX, dvrSPORT_tx_handler, IRQF_SHARED,
"sport_tx", &dev) < 0) {
DVR_DEBUG("%s %d : Unable to request sport tx irq\n",
__FUNCTION__, __LINE__);
return -EBUSY;
}
/*
if (request_irq(IRQ_SPORT1_RX, dvrSPORT_rx_handler, IRQF_SHARED,
"sport_rx", &dev) < 0) {
DVR_DEBUG("%s %d : Unable to request sport rx irq\n",
__FUNCTION__, __LINE__);
free_irq (IRQ_SPORT1_TX, &dev);
return -EBUSY;
}
if (request_irq(IRQ_SPORT1_ERROR, dvrSPORT_err_handler, 0,
"sport_err", &dev) < 0) {
DVR_DEBUG("%s %d : Unable to request sport err irq\n",
__FUNCTION__, __LINE__);
free_irq (IRQ_SPORT1_RX, &dev);
return -EBUSY;
}
*/
if (request_dma (CH_SPORT1_RX, "sport_rx_dma_chan") < 0) {
DVR_DEBUG("%s %d : Unable to request sport rx dma irq\n",
__FUNCTION__, __LINE__);
free_irq (IRQ_SPORT1_ERROR, &dev);
return -EBUSY;
}
set_dma_callback(CH_SPORT1_RX, dvrSPORT_dma_rx_irq_handler, &dev);
invalidate_dcache_range((unsigned long) rx_buf,
(unsigned long)(rx_buf + 32));
set_dma_start_addr(CH_SPORT1_RX, (unsigned long) rx_buf);
set_dma_x_count(CH_SPORT1_RX, 32);
set_dma_x_modify(CH_SPORT1_RX, 1);
set_dma_y_count(CH_SPORT1_RX, 0);
set_dma_y_modify(CH_SPORT1_RX, 1);
set_dma_config(CH_SPORT1_RX, RESTART | DI_EN);
enable_dma(CH_SPORT1_RX);
*((volatile unsigned int *)SIC_IMASK) |= 0x00001800;
*((volatile unsigned int *)SIC_IMASK) &= 0xfffff9e7;
*((volatile unsigned int *)SIC_IAR0) &= 0xfff0ffff;
*((volatile unsigned int *)SIC_IAR0) |= 0x000f0000;
*((volatile unsigned int *)SIC_IAR1) &= 0xfff00fff;
*((volatile unsigned int *)SIC_IAR1) |= 0x00020000;
*((volatile unsigned short *) SPORT1_TCR1) |= TSPEN;
*((volatile unsigned short *) SPORT1_RCR1) |= RSPEN;
SSYNC();
*((volatile unsigned short *) SPORT1_TCR1) &= ~TSPEN;
*((volatile unsigned short *) SPORT1_RCR1) &= ~RSPEN;
*((volatile unsigned short *) SPORT1_TCR1) = 0x0000;
*((volatile unsigned short *) SPORT1_TCR2) = 0x0007;
*((volatile unsigned short *) SPORT1_RCR1) = 0x0000;
*((volatile unsigned short *) SPORT1_RCR2) = 0x0007;
*((volatile unsigned short *) SPORT1_MCMC1) = 0x3000;
*((volatile unsigned short *) SPORT1_MCMC2) = 0x001c;
*((volatile unsigned int *) SPORT1_MTCS0) = 0xffffffff;
*((volatile unsigned int *) SPORT1_MTCS1) = 0x000000000;
*((volatile unsigned int *) SPORT1_MTCS2) = 0x000000000;
*((volatile unsigned int *) SPORT1_MTCS3) = 0x000000000;
*((volatile unsigned int *) SPORT1_MRCS0) = 0xffffffff;
*((volatile unsigned int *) SPORT1_MRCS0) = 0x000000000;
*((volatile unsigned int *) SPORT1_MRCS0) = 0x000000000;
*((volatile unsigned int *) SPORT1_MRCS0) = 0x000000000;
*((volatile unsigned short *) DMA3_CONFIG) = 0x0000;
*((volatile unsigned short *) DMA4_CONFIG) = 0x0000;
SSYNC();
if (request_irq(IRQ_SPORT1_TX, dvrSPORT_tx_handler, IRQF_SHARED,
"sport_tx", &dev) < 0) {
DVR_DEBUG("%s %d : Unable to request sport tx irq\n",
__FUNCTION__, __LINE__);
return -EBUSY;
}
/*
if (request_irq(IRQ_SPORT1_RX, dvrSPORT_rx_handler, IRQF_SHARED,
"sport_rx", &dev) < 0) {
DVR_DEBUG("%s %d : Unable to request sport rx irq\n",
__FUNCTION__, __LINE__);
free_irq (IRQ_SPORT1_TX, &dev);
return -EBUSY;
}
if (request_irq(IRQ_SPORT1_ERROR, dvrSPORT_err_handler, 0,
"sport_err", &dev) < 0) {
DVR_DEBUG("%s %d : Unable to request sport err irq\n",
__FUNCTION__, __LINE__);
free_irq (IRQ_SPORT1_RX, &dev);
return -EBUSY;
}
*/
if (request_dma (CH_SPORT1_RX, "sport_rx_dma_chan") < 0) {
DVR_DEBUG("%s %d : Unable to request sport rx dma irq\n",
__FUNCTION__, __LINE__);
free_irq (IRQ_SPORT1_ERROR, &dev);
return -EBUSY;
}
set_dma_callback(CH_SPORT1_RX, dvrSPORT_dma_rx_irq_handler, &dev);
invalidate_dcache_range((unsigned long) rx_buf,
(unsigned long)(rx_buf + 32));
set_dma_start_addr(CH_SPORT1_RX, (unsigned long) rx_buf);
set_dma_x_count(CH_SPORT1_RX, 32);
set_dma_x_modify(CH_SPORT1_RX, 1);
set_dma_y_count(CH_SPORT1_RX, 0);
set_dma_y_modify(CH_SPORT1_RX, 1);
set_dma_config(CH_SPORT1_RX, RESTART | DI_EN);
enable_dma(CH_SPORT1_RX);
*((volatile unsigned int *)SIC_IMASK) |= 0x00001800;
*((volatile unsigned int *)SIC_IMASK) &= 0xfffff9e7;
*((volatile unsigned int *)SIC_IAR0) &= 0xfff0ffff;
*((volatile unsigned int *)SIC_IAR0) |= 0x000f0000;
*((volatile unsigned int *)SIC_IAR1) &= 0xfff00fff;
*((volatile unsigned int *)SIC_IAR1) |= 0x00020000;
*((volatile unsigned short *) SPORT1_TCR1) |= TSPEN;
*((volatile unsigned short *) SPORT1_RCR1) |= RSPEN;
SSYNC();X
i read the SPORT1_STAT in the Tx interrupt function and the status is " 0X0010". In other words , TUVF case is occured.
the RX dma inerrupt is also not occured.
How to solove the TUVF problem? Is my configuration right??