Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
码匠许师傅
rt-thread
提交
17ee3d2c
R
rt-thread
项目概览
码匠许师傅
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
17ee3d2c
编写于
2月 18, 2021
作者:
B
Bernard Xiong
提交者:
GitHub
2月 18, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4346 from supperthomas/ci_test
[bsp/nrf5x] add the FAQ about hardfault
上级
7f7b52f9
b19e71e1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
56 addition
and
10 deletion
+56
-10
bsp/nrf5x/README.md
bsp/nrf5x/README.md
+51
-1
bsp/nrf5x/nrf52832/board/board.h
bsp/nrf5x/nrf52832/board/board.h
+1
-2
bsp/nrf5x/nrf52840/board/Kconfig
bsp/nrf5x/nrf52840/board/Kconfig
+2
-2
bsp/nrf5x/nrf52840/board/board.c
bsp/nrf5x/nrf52840/board/board.c
+0
-3
bsp/nrf5x/nrf52840/board/board.h
bsp/nrf5x/nrf52840/board/board.h
+2
-2
未找到文件。
bsp/nrf5x/README.md
浏览文件 @
17ee3d2c
...
...
@@ -132,4 +132,54 @@ nrf5x
下面提供一种擦写softdevice的方法。在keil中选择softdevice Erase的FLASH算法,这个时候就烧写之前可以擦除之前的softdevice。
![
image-20201017194935643
](
docs/images/softdevice_erase.png
)
\ No newline at end of file
![
image-20201017194935643
](
docs/images/softdevice_erase.png
)
### 2.如果在使用softdevice的时候,连上手机时候出现一些hardfault
如下所示:
```
psr: 0x8100000f
r00: 0x00000000
r01: 0x200034e6
r02: 0x00000000
r03: 0x200034dc
r04: 0x200034dc
r05: 0x00000000
r06: 0x200034e6
r07: 0xdeadbeef
r08: 0xdeadbeef
r09: 0xdeadbeef
r10: 0xdeadbeef
r11: 0xdeadbeef
r12: 0x00000000
lr: 0x000369af
pc: 0x00036972
hard fault on handler
```
这个hardfault发生在SOFTDEVICE内部,由于代码不开源,这边尝试了修改如下函数,可以不触发hardfault。
```
rt_hw_interrupt_disable PROC
EXPORT rt_hw_interrupt_disable
;MRS r0, PRIMASK
;CPSID I
BX LR
ENDP
;/*
; * void rt_hw_interrupt_enable(rt_base_t level);
; */
rt_hw_interrupt_enable PROC
EXPORT rt_hw_interrupt_enable
;MSR PRIMASK, r0
BX LR
ENDP
```
bsp/nrf5x/nrf52832/board/board.h
浏览文件 @
17ee3d2c
...
...
@@ -21,8 +21,7 @@ extern int __bss_end__;
#define HEAP_BEGIN ((void *)&__bss_end__)
#endif
#define HEAP_SIZE 16*1024
#define HEAP_END (HEAP_BEGIN + HEAP_SIZE)
#define HEAP_END (MCU_SRAM_END_ADDRESS)
void
rt_hw_board_init
(
void
);
...
...
bsp/nrf5x/nrf52840/board/Kconfig
浏览文件 @
17ee3d2c
...
...
@@ -314,8 +314,8 @@ menu "On-chip Peripheral Drivers"
endif
config BSP_USING_SPI
bool "Enable SPI"
select RT_USING_
PIN
default
y
select RT_USING_
SPI
default
n
if BSP_USING_SPI
config NRFX_SPI_ENABLED
...
...
bsp/nrf5x/nrf52840/board/board.c
浏览文件 @
17ee3d2c
...
...
@@ -53,9 +53,6 @@ void SysTick_Configuration(void)
void
rt_hw_board_init
(
void
)
{
rt_hw_interrupt_enable
(
0
);
// sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
/* Activate deep sleep mode */
SCB
->
SCR
|=
SCB_SCR_SLEEPDEEP_Msk
;
SysTick_Configuration
();
...
...
bsp/nrf5x/nrf52840/board/board.h
浏览文件 @
17ee3d2c
...
...
@@ -21,8 +21,8 @@ extern int __bss_end__;
#define HEAP_BEGIN ((void *)&__bss_end__)
#endif
#define HEAP_SIZE 16*1024
#define HEAP_END (
HEAP_BEGIN + HEAP_SIZE
)
#define HEAP_END (
MCU_SRAM_END_ADDRESS
)
void
rt_hw_board_init
(
void
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录