Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
SummerGao.
rt-thread
提交
8302a722
R
rt-thread
项目概览
SummerGao.
/
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,发现更多精彩内容 >>
未验证
提交
8302a722
编写于
9月 19, 2020
作者:
B
Bernard Xiong
提交者:
GitHub
9月 19, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3913 from Michael0066/master
MIPS:fix the RT_EXCEPTION_MAX value
上级
8afb8b1e
ab78ea1d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
1 deletion
+34
-1
bsp/ls2kdev/drivers/board.c
bsp/ls2kdev/drivers/board.c
+10
-0
bsp/ls2kdev/drivers/ls2k1000.h
bsp/ls2kdev/drivers/ls2k1000.h
+23
-0
libcpu/mips/common/exception.c
libcpu/mips/common/exception.c
+1
-1
未找到文件。
bsp/ls2kdev/drivers/board.c
浏览文件 @
8302a722
...
...
@@ -16,15 +16,22 @@
#include "exception.h"
#include "drv_uart.h"
#include "board.h"
#include "ls2k1000.h"
/**
* this function will reset CPU
*
*/
void
rt_hw_cpu_reset
(
void
)
{
WDT_EN
=
0x01
;
WDT_TIMER
=
0x01
;
WDT_SET
=
0x01
;
rt_kprintf
(
"reboot system...
\n
"
);
while
(
1
);
}
MSH_CMD_EXPORT_ALIAS
(
rt_hw_cpu_reset
,
reboot
,
reset
cpu
);
/**
* this function will shutdown CPU
...
...
@@ -32,10 +39,13 @@ void rt_hw_cpu_reset(void)
*/
void
rt_hw_cpu_shutdown
(
void
)
{
PM1_STS
&=
0xffffffff
;
PM1_CNT
=
0x3c00
;
rt_kprintf
(
"shutdown...
\n
"
);
while
(
1
);
}
MSH_CMD_EXPORT_ALIAS
(
rt_hw_cpu_shutdown
,
poweroff
,
shutdown
cpu
);
/**
...
...
bsp/ls2kdev/drivers/ls2k1000.h
浏览文件 @
8302a722
...
...
@@ -3,6 +3,7 @@
#include <mips.h>
#include "interrupt.h"
#include <rthw.h>
#define APB_BASE CKSEG1ADDR(0xbfe00000)
...
...
@@ -24,6 +25,28 @@
#define GEN_CONFIG0_REG (0xFFFFFFFFBfe10420)
/*
* General PM Configuration Register
*/
#define PMCON_BASE (APB_BASE | (0x7 << 12))
/*
* Power Management1 Configuration Registers
*/
#define PM1_BASE (PMCON_BASE + 0x0C)
#define PM1_STS HWREG32(PM1_BASE)
#define PM1_EN HWREG32(PM1_BASE + 0x04)
#define PM1_CNT HWREG32(PM1_BASE + 0x08)
/*
* Watch Dog Configuration Registers
*/
#define WDT_BASE (PMCON_BASE + 0x30)
#define WDT_EN HWREG32(WDT_BASE)
#define WDT_SET HWREG32(WDT_BASE + 0x04)
#define WDT_TIMER HWREG32(WDT_BASE + 0x08)
void
rt_hw_timer_handler
(
void
);
void
rt_hw_uart_init
(
void
);
...
...
libcpu/mips/common/exception.c
浏览文件 @
8302a722
...
...
@@ -74,7 +74,7 @@ void rt_hw_interrupt_enable(rt_base_t level)
/**
* exception handle table
*/
#define RT_EXCEPTION_MAX 3
1
#define RT_EXCEPTION_MAX 3
2
exception_func_t
sys_exception_handlers
[
RT_EXCEPTION_MAX
];
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录