-
APM32F107串口中断接收丢包
APM32F107在串口同时发送和接收的情况下串口接收丢字节,具体表现为偶发进入串口接收中断了,但是USART_FLAG_RXBNE标志位没有触发,导致读不到这个字节进而丢字节,通过计数发现进入中断的次数与实际应该收到的字节数一致。1、发送是阻塞式发送的,没有用发送中断,排除进入的是发送中断的可能。2、出现这种情况时打断点看了,其他的溢出及错误标志位并没有置位,也打印检查了,没有置位。3、排查代码了没有在其他地方主动调用USART_RxDatad读取。4、串口中断优先级已调至最高。5、只接收不发送不会丢字节,挂一晚上都不丢,只要一发送接收就会丢。发送代码:voidUart1_Send(charbuf){uint16_tdata_9th=buf;dog_feed_count_clean();//循环清除喂狗变量,超过DOG_PROTECT_TIME_100MS不清除则认为主循环异常,并停止喂狗。if(g_rParameters.sPort[0].ucParity==UART_CHK_MARK){data_9th|=(1
2025-04-24 37 -
GD32F407使用freeRTOS死机
在GD32F407跑了freeRTOS,串口接收使用了DMA+IDLE中断来实现不定长接收,串口的IDLE中断中接收完数据后,通过事件通知线程执行解析,但是中断中调用xEventGroupSetBitsFromISR函数后就会死机
2024-05-31 56 -
keil怎么测量时间
测试
2023-09-14 47 -
ST-link检测不到MCU板芯片
LKS081开发板上电以后,ST-link检测不到芯片,并且FlashDownload中的ResetandRun勾选上以后,关闭选项卡再打开又回到原先没有勾选的状态,请问这是咋回事啊
2023-07-28 46 -
MM32F0144用MM32-Link为什么一直无法识别
RTMM32-Link是正常连接的SWDevice一直提示:NOCortex-MSWDeviceFound
2022-12-16 30 -
MPLAB X IDE中使用hexmate工具生成的16位checksum问题
请问下,我在使用hexmate生成的16位checksum与hexmate手册中CheckSum算法代码所生成checksum不一样?以下为hexmate用户手册7.1.1AdditionAlgorithms中的checksum生成代码#includetypedefuint8_tread_t;//sizeofdatavaluesreadandsummedtypedefuint16_tresult_t;//sizeofchecksumresult//addtooffset,nadditionsofvaluesstartingataddressdata,//truncatingandreturningtheresult//data:theaddressofthefirstvaluetosum//n:thenumberofsumstoperform//offset:theintialvaluetowhichthesumisaddedresult_tck_add(constread_t*data,unsignedn,result_toffset){result_tchksum;chksum=offset;while(n--){chksum+=*data;data++;}returnchksum;}实际工程中的checkSum设置:hexmate${ImagePath}-FILL=0x3FFF@0x0000:0x7FFB-CK=0x0800-0x0802@0x7FFC+0x00w-2t34g1-o${ImagePath}在MPLABXIDE的ProgramMemory窗口中查看到的0x400地址处内容为0x3184,如果按照上述checkSum计算方法得到的checksum值为B5,而使用hexmate生成的checksum值为C9请问下,到底这个hexmate生成的16位checksum算法是怎样的?
2022-07-28 7 -
AutoChips开发板收到后,使用KEIL5开发,打开例程显示找不到...
本帖最后由hailang19881003于2021-3-2415:24编辑开发板收到后,使用MDK开发,显示大家有遇到的吗?ErrorinstantiatingRTEcomponentsError#540:'AutoChips.AC781xDevelopmentKit::BoardSupport:AC781xDevelopmentKit:DebugInterface:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips.AC781xDevelopmentKit::BoardSupport:AC781xDevelopmentKit:OLED:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips::Device:ATCDrivers:DMA:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips::Device:ATCDrivers:GPIO:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips::Device:ATCDrivers:I2C:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips::Device:ATCDrivers:UART:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips::Device:Startup:1.0.0'componentisnotavailablefortarget'GPIODEMO'
2021-03-24 18