您尚未登录。

楼主 #1 2020-07-10 21:11:15

hljswl
会员
注册时间: 2020-05-22
已发帖子: 13
积分: 2.5

荔枝派V3S移植rtthread,外设中断不进入irq中断,进入swi中断

向大佬们求助,尝试在荔枝派zero上移植rtthread,rtt启动后外设中断会进入swi中断函数里面去。
rtt启动信息:

\ | /
- RT -     Thread Operating System
/ | \     3.1.4 build Jul 10 2020
2006 - 2019 Copyright by rt-thread team
periph_get_pll_clk: 600000000
cpu_get_clk: 1008000000
ahb1_get_clk: 300000000
ahb2_get_clk: 300000000
apb1_get_clk: 150000000
apb2_get_clk: 24000000
software interrupt:
Execption:
r00:0x00000017 r01:0x0000000a r02:0x01c2807c r03:0x40038828
r04:0xdeadbeef r05:0xdeadbeef r06:0xdeadbeef r07:0xdeadbeef
r08:0xdeadbeef r09:0xdeadbeef r10:0xdeadbeef
fp :0xdeadbeef ip :0x0000014b
sp :0x40052ff8 lr :0x40032ad0 pc :0x40032ad4
cpsr:0x60000013
thread pri  status      sp     stack size max used left tick  error
------ ---  ------- ---------- ----------  ------  ---------- ---
tshell  20  ready   0x00000040 0x00001000    01%   0x0000000a 000
tidle   31  ready   0x00000040 0x00000100    25%   0x00000020 000
timer    4  suspend 0x0000006c 0x00000200    21%   0x0000000a 000
main    10  ready   0x00000040 0x00000800    50%   0x00000014 000
--- high pending priority: 32(00000020)
--- hw mask ---
0x0000ffff, 0x00028001, 0x00000000, 0x00000000,
--- hw pending ---
0x00000000, 0x00000001, 0x00000000, 0x00000000,
--- hw active ---
0x00000000, 0x00000000, 0x00000000, 0x00000000,
shutdown...
(0) assertion failed at function:rt_hw_cpu_shutdown, line number:85

离线

楼主 #2 2020-07-11 00:14:14

hljswl
会员
注册时间: 2020-05-22
已发帖子: 13
积分: 2.5

Re: 荔枝派V3S移植rtthread,外设中断不进入irq中断,进入swi中断

问题解决了,就是中断向量表位置的问题。
VBAR描述
VBAR寄存器会忽略末尾5位,原来的system_vectors在0x40000010,实际变成0x40000000,漂移0x10,正好对应_vector_swi。将system_vectors改为0x40000020就解决了。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn