-
Notifications
You must be signed in to change notification settings - Fork 108
Description
我正在尝试将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?