-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bsp][cvitek] update: add hwtimer driver #39
Conversation
请检查并确保 PR 的 checklist 都已经正确执行 ,见上面 PR 的内容部分的勾选项。 |
已检查并勾选 |
@@ -295,6 +295,32 @@ menu "General Drivers Configuration" | |||
default n | |||
endif | |||
|
|||
menuconfig BSP_USING_HWTIMER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么只支持了小核?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
当前实测小核驱动正常,大核不能正常进入定时器中断(中断号与datasheet一致,80-86)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
当前实测小核驱动正常,大核不能正常进入定时器中断(中断号与datasheet一致,80-86)
请继续解决这个问题,我记得在裸机下试过大核的 timer 中断是好的。请看看是哪里的问题?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
发现原因是大核最大中断号设置为64(定时器终端号大于该值),导致初始化时没有成功注册定时器中断。
config IRQ_MAX_NR
int
default 64
bsp/cvitek/c906_little/board/Kconfig
Outdated
|
||
config TIMER_IRQ_BASE | ||
int | ||
default 51 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
针对的是CV1800B
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
针对的是CV1800B
那需要在 Kconfig 中用 board type 区分开才好。
@Z8MAN8 上面你有个评论里的贴图好像出问题了,检查一下? 重贴还是删掉? |
测试截图已更新 |
看不到你的测试代码,所以贴图也看不出什么 |
测试代码如下,由于定时器频率仅可选为25MHz /32KHz,当前驱动和测试均默认使用25MHz /*
#include <rtthread.h> #define HWTIMER_DEV_NAME "timer4" /* 定时器名称 */ /* 定时器超时回调函数 */ static int hwtimer_sample(int argc, char argv[]) MSH_CMD_EXPORT(hwtimer_sample, hwtimer sample); |
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
你的解决方案是什么 (what is your solution)
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up