UART 的接收与USB的电压有关吗?
UART可以发送,不能接收,不知道怎么回事,不知道与电压是否有关?谁能指点下吗?感谢!!
模块UART的电压就是VDD_PADS,也就是IO口电压,你看看VDD_PADS接的电压是多少V,8670有好几组VDD_PADS,对应不同IO。
楼主你的问题解决了吗?我的8670也是只能发送出去,接收不到数据
void uart_handler(Task task, MessageId id, Message message)
{
UART_DEBUG(("uart handler id=0x%0x\n",id));
switch(id)
{
case SEND_UART_DATA: /*发送 */
{
uart_send(u8SendBuf, 7);
MessageCancelAll(task, SEND_UART_DATA);
}
break;
case MESSAGE_MORE_DATA: /*接收 */
{
Source source = StreamUartSource();
uint16 size = SourceSize(source);
#ifdef DEBUG_UART
uint8* data = (uint8*)SourceMap(source);
uint16 i=0;
UART_DEBUG(("uart received bytes: %d\r\n", size));
for(i = 0; i < size; i++)
UART_DEBUG(("%c\r\n", data));
#endif
SourceDrop(source, size);
}
break;
default:
break;
}
}
每次8670发送出去后handler中会收到0x0822 的消息,电脑发送消息到8670,没有反映
晕死还真是电压不匹配造成的
页:
[1]