- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
volatile int m_context_Timer;
static void timer1ms_interrupts(void* context)
{
IOWR_ALTERA_AVALON_TIMER_STATUS(SYS_CLK_TIMER_BASE,0);
}
void init_timer()
{
void* timer_ptr=(void*)&m_context_Timer;
IOWR_ALTERA_AVALON_TIMER_STATUS(SYS_CLK_TIMER_BASE,0);
IOWR_ALTERA_AVALON_TIMER_CONTROL(SYS_CLK_TIMER_BASE,7);
alt_ic_isr_register(SYS_CLK_TIMER_IRQ_INTERRUPT_CONTROLLER_ID,SYS_CLK_TIMER_IRQ,timer1ms_interrupts,timer_ptr,0x0);
Niosにて、自動で生成されたiniche_init.cファイル内に上記コードを挿入し、
SSSInitialTask内の適当なところに、init_timer()を呼ぶようにしました。
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
timer1ms_interruptsは定期的に呼ばれるのですが、他タスクが止まってしまうようで、ソケット通信が出来なくなってしまいました。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I just see the code, please elaborate more in your question.
I will be happy to help you.
Regards,

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page