- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have set up one NIOS2, one ONCHIP_RAM(4K), one INTERNAL_TIMER and four PIO in the SOPC builder. my board use 25Mhz osicllation.
I want to design a timer interrupt routine, just for glittering the LEDs. int main (void) __attribute__ ((weak, alias ("alt_main"))); alt_u8 x = 0x5; static void timer_interrupts(void* context, alt_u32 id) { IOWR_ALTERA_AVALON_TIMER_STATUS(SYS_TIMER_BASE, 0);//clear TO IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, x);//light LEDs if(x==5)x=0xA; else x=5; } int alt_main (void) { alt_irq_register(SYS_TIMER_IRQ, (void*)&x, timer_interrupts); IOWR_ALTERA_AVALON_TIMER_PERIODL(SYS_TIMER_BASE, 0xBC20); IOWR_ALTERA_AVALON_TIMER_PERIODH(SYS_TIMER_BASE, 0xBE); IOWR_ALTERA_AVALON_TIMER_CONTROL(SYS_TIMER_BASE, 7); while (1) { ; } return 0; } built complete!!! when I downlaod program to EP1c12, but the console said verify failed http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif what's wrong with my routine??? the hardware is ok and i can download the hello_led routine.Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is the RAM also connected to the data port of the processor?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Verified failed? Sounds to me like memory problem. Have you check the .elf size is it <4k? or as svhb pointed out: is the data and address ports connected to the CPU?
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