JYFP_3506
JYFP_3506
This guy hasn't written anything yet

注册于 1 year ago

回答
3
文章
0
关注者
0

40a2f8963292c5e5f4ca5e0f4f5e5d43.png
如图,SPI已经打开,但没有地方单独打开SPI3总线啊?
@mii SPI2总线已经初始化成功,上面写的很清楚,而且这个SPI2已经用过1年多了

为什么加上__disable_irq();就跳不过去,理论上不应该啊,我看人家都是加上的

有时候崩溃提示下面的内容:

Function[rt_mutex_take] shall not be used in ISR
thread   pri  status      sp     stack size max used left tick  error
-------- ---  ------- ---------- ----------  ------  ---------- ---
sim0_li   10  suspend 0x000000d8 0x0000052c    80%   0x00000004 000
mqttt0    20  suspend 0x0000016c 0x00000a8c    73%   0x00000002 000
at_clnt    9  suspend 0x00000104 0x00000600    72%   0x00000005 000
.................................................
..............................................
timer      4  suspend 0x000000a8 0x00000200    32%   0x00000009 000
main      10  suspend 0x000000e0 0x000006bc    60%   0x00000001 000
05-19 04:43:09.053 E/cmb ISR: 
05-19 04:43:09.053 E/cmb ISR: (0) has assert failed at rt_mutex_take:662.
total memory: 47020
used memory : 38108
maximum allocated memory: 38188
05-19 04:43:09.053 E/cmb ISR: 
05-19 04:43:09.053 E/cmb ISR: Firmware name: testff, hardware version: v1.01, software version: v1.02
05-19 04:43:09.053 E/cmb ISR: Assert on thread Communic
05-19 04:43:09.053 E/cmb ISR: ===== Thread stack information =====
05-19 04:43:09.053 E/cmb ISR:   addr: 20008d88    data: 08040abc
05-19 04:43:09.053 E/cmb ISR:   addr: 20008d8c    data: 0804dccc
05-19 04:43:09.053 E/cmb ISR:   addr: 20008d90    data: 00000296
05-19 04:43:09.053 E/cmb ISR:   addr: 20008d94    data: 08001a8d
05-19 04:43:09.053 E/cmb ISR:   addr: 20008d98    data: 00000031
05-19 04:43:09.053 E/cmb ISR:   addr: 20008d9c    data: 00000296

用其他的4G模块也是一样有这个问题,使用的AT 组件版本和配置是:

#define PKG_USING_AT_DEVICE
#define AT_DEVICE_USING_AIR720
#define AT_DEVICE_AIR720_INIT_ASYN
#define AT_DEVICE_AIR720_SAMPLE
#define AIR720_SAMPLE_POWER_PIN 16
#define AIR720_SAMPLE_STATUS_PIN -1
#define AIR720_SAMPLE_CLIENT_NAME "uart2"
#define AIR720_SAMPLE_RECV_BUFF_LEN 512
#define PKG_USING_AT_DEVICE_LATEST_VERSION
#define PKG_AT_DEVICE_VER_NUM 0x99999

#define RT_USING_AT
#define AT_USING_CLIENT
#define AT_CLIENT_NUM_MAX 1
#define AT_USING_SOCKET
#define AT_USING_CLI
#define AT_CMD_MAX_LEN 128
#define AT_SW_VERSION_NUM 0x10300

那个崩溃提示,表面看起来是在中断内调用rt_mutex_take,但是实际上看了代码程序里面所有中断都没有调用rt_mutex_take,如果调用的话早就崩溃了,不可能运行5,6天才崩溃

我也遇到这个问题,偶尔导致系统崩溃,确实是SPI的device里用到了mutex,在函数rt_spi_send_then_recv(0)里面调用了rt_mutex_take(),楼上的如何解决的,发现并没有内存越界和溢出啊,栈放到了4K,才用到了2K多

ST-LINK怎么不支持?到底用什么下载器?
加了OTA模块后编译出错:

collect2.exe: error: ld returned 1 exit status
make: *** [makefile:73: rtthread.elf] Error 1

开始下载程序:2020-01-14 14:35:03

D:\RT-ThreadStudio\platform\ST-LINK\tools\bin>D:/RT-ThreadStudio/platform/ST-LINK/tools/bin/STM32_Programmer_CLI.exe -c port=SWD mode=NORMAL -e all -d D:\RT-ThreadStudio\workspace\MENG\Debug\rtthread.elf -hardRst 
-------------------------------------------------------------------
STM32CubeProgrammer v2.1.0
-------------------------------------------------------------------
Error: ST-LINK V1 not supported
Error: ST-LINK v1 not supported.

执行完毕, 耗时:518ms.

回到
顶部

发布
问题

投诉
建议