AnsweredAssumed Answered

interrupt about Uart DMA (bf533)

Question asked by sinma on Jun 9, 2010
Latest reply on Jan 29, 2013 by Andreas

my code as follow

 

*pSIC_IAR1=0x34666666;
*pSIC_IAR2=0x66666666;
register_handler(ik_ivg10, DMA7_UART_TX_ISR);
register_handler(ik_ivg11, UART_RxIsr);

 


*pSIC_IMASK|=0x00004000;  //uart interrupts

*pSIC_IMASK|=0x00008000;  //uar dma7 interrupts

 

 

*pDMA7_CONFIG=0x0080; /* ,linear block,8bit,Source */
ssync();

*pDMA7_PERIPHERAL_MAP=0x7000;/*UART-TX*/
ssync();

*pDMA7_X_COUNT = 10;
ssync();

*pDMA7_X_MODIFY = 1;/*Linear*/
ssync();

*pDMA7_Y_COUNT = 0;
ssync();

*pDMA7_Y_MODIFY = 0;
ssync();

/* enable sport0_dma_start_hi_addr */
*pDMA7_START_ADDR = test_S;
ssync();

*pDMA7_CONFIG|=0x01;/*Enable DMA*/

ssync();

 

int iDivisor = 0;
*pUART_GCTL = UCEN;
//enable access to UART_DL registers
*pUART_LCR = DLAB;

  iDivisor = SCLK/(BAUD*16);
  *pUART_DLL = iDivisor;
  *pUART_DLH = iDivisor>>8;
  //set UART frame to 8 bits, no parity, 1 stop bit.
  *pUART_LCR = WLS(8);
  //start the uart interrupt
  ssync();
  *pUART_LCR &= ~DLAB;// Disable Divisor Latch Access
  ssync();

  *pUART_IER =0x3;//Enable interrupts for receive & transmit

   //*pUART_IER =0x2;//Enable interrupts for transmit

   //*pUART_IER =0x1;//Enable interrupts for receive

   ssync();
   *pUART_GCTL = UCEN;/*UART Clock enable*/
   ssync();

 

if enable the UART  ETBEI interrupts in the UART_IER register,it will cause interrupter immediately and cann't stop .why?

Outcomes