2397 views|1 replies

76

Posts

0

Resources
The OP
 

PIC32MK encounters problems in UART data transmission and reception using DMA [Copy link]

I have configured DMA and UART. There is no problem in sending and receiving in non-DMA mode, and both TX and RX interrupts can be entered. Later, I changed to DMA mode and there was no response. The following is my configuration code and data sending code. Masters, please help me. The following is the code part for configuring UARTU1MODEbits.PDSEL = 0; //8-bit data, no parity checkU1MODEbits.STSEL = 0; //One stop bitU1MODEbits.UEN = 0; U1STAbits.URXEN = 0; //Receiver enableU1STAbits.UTXEN = 0; //Transmitter enableU1STAbits.UTXISEL = 1; U1STAbits.URXISEL = 0; U1STAbits.UTXINV = 0; U1STAbits.UTXBRK = 0; U1MODEbits.BRGH = 1; //High-speed modeU1BRG = 14; //Baud rate 2000000 U1MODEbits.ON = 1; The following is the data transmission code for(i=0;i<8;i++) { Tx_Data[i] = i; } DCH0SSIZ = 8; DCH0SSA = &Tx_Data[0]; DCH0DSIZ = 8; DCH0DSA = &U1TXREG; DCH0CSIZ = 8; DCH0ECONbits.CHSIRQ = 40; DCH0CONbits.CHEN = 1; // Enable CH0 DCH0ECONbits.CFORCE = 1; // Force DMA
This post is from Microchip MCU
 

76

Posts

0

Resources
2
 
I found the problem. It was the source size and the target size. I haven't had time to finish the post. I hope the problem I encountered is useful to you.
This post is from Microchip MCU
 
 
 

Just looking around
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