i configure the uart as folow:
Gpio_CMUartInit ( );
SCI_performSoftwareReset ( SCIA_BASE );
SCI_setConfig ( SCIA_BASE, DEVICE_LSPCLK_FREQ, 57600, (SCI_CONFIG_WLEN_8 |
SCI_CONFIG_STOP_ONE |
SCI_CONFIG_PAR_NONE ) );
SCI_resetChannels ( SCIA_BASE );
SCI_enableFIFO ( SCIA_BASE );
SCI_enableModule ( SCIA_BASE );
SCI_enableInterrupt ( SCIA_BASE, SCI_INT_TXFF );
SCI_disableInterrupt ( SCIA_BASE, SCI_INT_RXERR );
SCI_setFIFOInterruptLevel ( SCIA_BASE, SCI_FIFO_TX0, SCI_FIFO_RX1 );
//SCI_performSoftwareReset ( SCIA_BASE );
Interrupt_register ( INT_SCIA_TX, Uart_TxInterrupt );
SCI_clearInterruptStatus ( SCIA_BASE, SCI_INT_TXFF );
Interrupt_clearACKGroup ( INTERRUPT_ACK_GROUP9 );
/***********************************************************************
* Function Name: Uart_TxInterrupt *
* Description : *
***********************************************************************/
__interrupt void Uart_TxInterrupt( void ){
if( Uart.Length >= 16 ){
Uart.Length -= 16 ;
Uart.Index += 16 ;
}
else Uart.Length = 0;
if( Uart.Length ){
SCI_writeCharArray( SCIA_BASE, &Uart.pData[Uart.Index], (Uart.Length >= 16) ? 16 : Uart.Length );
}
else{
PailotCamPosCom_TxFinish( );
Interrupt_disable ( INT_SCIA_TX );
}
SCI_clearInterruptStatus ( SCIA_BASE, SCI_INT_TXFF );
Interrupt_clearACKGroup ( INTERRUPT_ACK_GROUP9 );
}
/***********************************************************************
* Function Name: Uart_CMGetChar *
* Description : *
***********************************************************************/
Result_e Uart_SendArray( U16 Length, U8 *pData ){
if( Uart.Length )return( RES_IN_PROGRESS );
Uart.Index = 0 ;
Uart.Length = Length ;
Uart.pData = pData ;
SCI_writeCharArray( SCIA_BASE, &Uart.pData[Uart.Index], (Uart.Length >= 16) ? 16 : Uart.Length );
Interrupt_enable ( INT_SCIA_TX );
SCI_clearInterruptStatus ( SCIA_BASE, SCI_INT_TXFF );
Interrupt_clearACKGroup ( INTERRUPT_ACK_GROUP9 );
return( RES_SUCCESS );
}
When call to Uart_SendArray i get imidatly interrupt even the fifo is full
What im doing wrong?