2469 views|0 replies

1

Posts

0

Resources
The OP
 

I would like to ask about the ADUC7060 issue, thank you! [Copy link]

I just got started with ADUC7060. When debugging UART, I can operate the sending and receiving sampling query methods, but I can't get into the interrupt when I want to receive. int main(void) { POWKEY1 = 0x1; //before to write data to POWCON0,must first write 0x01 to the POWKEY1 POWCON0 = 0x68; // Set core to max CPU speed of 10.24Mhz POWKEY2 = 0xF4; //reset wifi module ResetWifi(); //init uart 115200bps N 8 GP1CON =0x11;//P1.0,P1.1? COMCON0 = BIT7; // Enable access to COMDIV registers COMDIV0 = 0x02; // Set baud rate to 115200. COMDIV1 = 0x00; COMDIV2 = 0x8b1c; // Enable fractional divider 0x01) { // Serial port interrupt signal is 0x02; // Serial port interrupt signal is 0x03; // Serial port interrupt signal is 0x04; // Serial port interrupt signal is 0x05; // Serial port interrupt signal is 0x06; // Serial port interrupt signal is 0x07; // Serial port interrupt signal is 0x08; // Serial port interrupt signal is 0x09; // Serial port interrupt signal is 0x10; // Serial port interrupt signal is 0x11; // Serial port interrupt signal is 0x12; // Serial port interrupt signal is 0x13; // Serial port interrupt signal is 0x14; // Serial port interrupt signal is 0x15; // Serial port interrupt signal is 0x16; // Serial port interrupt signal is 0x17; // Serial port interrupt signal is 0x18 set // { // RecDataTemp = COMRX; // read COMRX register // COMTX = RecDataTemp+1; // Load Tx buffer // while ((COMSTA0 & 0x40) == 0x00); // Wait for Tx buffer empty bit to be se // } /************************************************************************************************/ if(bSendResultToUART) { COMTX = RecDataTemp+1; while ((COMSTA0 & 0x40) == 0x00); // Wait for Tx buffer empty bit to be set bSendResultToUART = 0; } } } void IRQ_Handler(void) __irq { IRQSTATUS = IRQSTA; // Read off IRQSTA register ucCOMIID0 = COMIID0; // Read the UART IRQ ID register // if ((IRQSTATUS & BIT11) == BIT11) //UART interrupt source { // if ((ucCOMIID0 & 0x4) == 0x4) // Receive buffer Full { RecDataTemp = COMRX; // read COMRX register bSendResultToUART = 1; // Set flag to return a string to the PC } } } If you have used this function before, please help me analyze it.



This post is from ADI Reference Circuit
 
 

Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list