Skip to content
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

移植 RT-Thread Nano 到 RISC-V 系统时钟配置 #3

Open
thisisausername-rgb opened this issue Mar 28, 2020 · 0 comments
Open

移植 RT-Thread Nano 到 RISC-V 系统时钟配置 #3

thisisausername-rgb opened this issue Mar 28, 2020 · 0 comments

Comments

@thisisausername-rgb
Copy link

thisisausername-rgb commented Mar 28, 2020

我正在尝试将rtthread-nano移植到卡在系统时钟配置上的risc-v e310
配置系统时钟Created rt_hw_board_init()来调用开发板提供的功能来配置64MHz(如果我正确的话)
我被困在执行操作系统节拍
`void rt_hw_board_init()
{
...
rt_hw_timer_init(); //使用硬件计时器来实现时钟滴答,通常命名为rt_hw_timer_init()
...
}

int rt_hw_timer_init(void)//函数实现自身并需要加载中断服务程序
{
...
rt_hw_interrupt_install(IRQ_PBA8_TIMER2_3,rt_hw_timer_isr,RT_NULL,“ tick”);
rt_hw_interrupt_umask(IRQ_PBA8_TIMER2_3);
}

/ 中断服务程序 /
静态void rt_hw_timer_isr(int向量,void *参数)
{
rt_interrupt_enter();
rt_tick_increase();
rt_interrupt_leave();
}`
IRQ_PBA8_TIMER2_3是int类型的中断向量
我需要添加一些东西才能得到它。是开发板附带的api函数还是rtthread函数?


I am trying to port rtthread-nano to risc-v e310 stuck on the system clock configuration
Configure the system clock Created rt_hw_board_init () to call the function provided by the development board to configure 64MHz (if I am right)
I am stuck at implementing the OS beat
`void rt_hw_board_init ()
{
     ...
     rt_hw_timer_init (); // use hardware timer to realize clock tick, generally named rt_hw_timer_init ()
     ...
}

int rt_hw_timer_init (void) // function implements itself and needs to load interrupt service routine
{
     ...
     rt_hw_interrupt_install (IRQ_PBA8_TIMER2_3, rt_hw_timer_isr, RT_NULL, "tick");
     rt_hw_interrupt_umask (IRQ_PBA8_TIMER2_3);
}

/ * Interrupt service routine * /
static void rt_hw_timer_isr (int vector, void * param)
{
     rt_interrupt_enter ();
     rt_tick_increase ();
     rt_interrupt_leave ();
} `
IRQ_PBA8_TIMER2_3 is an interrupt vector of type int
I need to add something before to get it. Is it the api function or rtthread function that comes with the development board?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant