在线时间163 小时
UID261364
注册时间2020-5-12
NXP金币157
该用户从未签到
高级会员
- 积分
- 979
- 最后登录
- 2024-5-8
|
从max的demo里导出dmauart的程序,编译很顺利,但是在uart输出端没有看到任何信息,代码是这样设定的demo出处lpcopen_3_01_lpcxpresso_nxp_lpcxpresso_824max.zip
#define USE_VCOM 0
#if (!USE_VCOM)
#define UART_TX_PIN 4
#define UART_RX_PIN 0
#else
#define UART_TX_PIN 7
#define UART_RX_PIN 18
#endif
我的硬件是连接在pin7 pin18,确认过硬件是好的,地也接了,我从pc发送没有任何反应,我的硬件是824lit
/* Enable the DMA IRQ */
NVIC_EnableIRQ(DMA_IRQn);
/* Enqueue a bunch of strings in DMA transmit descriptors and start
transmit. In this use of DMA, the descriptors aren't chained, so
the DMA restarts the next queued descriptor in the DMA interrupt
handler. */
for (idx = 0; idx < DMASENDSTRCNT; idx++) {
sprintf(dmaSendStr[idx], "DMA send string (unlinked) #%d\r\n", idx);
dmaTXSend((uint8_t *) dmaSendStr[idx], strlen(dmaSendStr[idx]));
}
while (1) {
/* Sleep until something happens */
__WFI();
/* Did any data come in? */
bytes = checkRxData(buff);
if (bytes > 0) {
/* RX data received, send it via TX DMA */
dmaTXSend(buff, bytes);
}
大概是哪里的问题?
|
|