
我发送数据量为640个十六进制数据是正常的,上位机有收到书籍。但是我想发送3600个数据就一直灭有反应,不知道为啥什么,求助。我使用的是A9,A10的usart接口。以下是部分代码 #include "stm32f10x.h" // Device header #include <stdio.h> #include <stdarg.h> void Serial_Init(void) { RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); GPIO_InitTypeDef GPIO_InitStructure; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOA, &GPIO_InitStructure); USART_InitTypeDef USART_InitStructure; USART_InitStructure.USART_BaudRate = 9600; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Tx | USART_Mode_Rx; USART_InitStructure.USART_Parity = USART_Parity_No; USART_InitStructure.USART_StopBits = USART_StopBits_1; USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_Init(USART1, &USART_InitStructure); USART_ITConfig(USART1, USART_IT_RXNE, ENABLE); NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); NVIC_InitTypeDef NVIC_InitStructure; NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_Init(&NVIC_InitStructure); USART_Cmd(USART1, ENABLE); } void Serial_SendByte(uint8_t Byte) { USART_SendData(USART1, Byte); while (USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET); } void Serial_SendArray(uint8_t *Array, uint16_t Length) { uint16_t i; for (i = 0; i < Length; i ++) { Serial_SendByte(Array[i]); } } 然后我定义了一个数组arra[3600],用 Serial_SendArray函数发送后没有反应 |
stm32f407无法配置定时器2为全部dma
求助,使用51单片机和VL6180X传感器测距,结果一直是0是什么原因,能读到ID为0xB4
STM32F103TBU6 封装是VFQFPN36 将PD0和PD1配置成CAN不成功是什么原因
串口DMA + 空闲中断收发 ?
F103RCT6芯片对AFIO->MAPR寄存器写入时出错
使用STM32捕获PWM时同时捕获2个通道时会出现捕获的频率值不准确的问题
WS2812B怎么显示任意字符 / 图案?
STM32F103RCT6 定位孔 镂空,会影响使用吗?
HAL库1.8.4在做破坏性测试的时候出现g_state永远为busy的情况导致串口通信发送卡死
L9663驱动开发
BootLoader 上用的
我都是接0