Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Garbage at reset

Guys, for long time I'm experiencing an interresting behavior of NIOS, but now I said enough is enough, I have to report, perhaps some of you has some solution and tell me what I'm doing wrong. The case is simple, here is a pseudo code like something:

void main()

{

printf("start\n");

subroutine calls, etc.

printf("done'n");

while (1) ()

}

When I hit run as NIOS HW in NOIS IDE or in ECLIPSE, first time runs fine, but if I hit couple of times the reset button, what is tied to NIOS RESETn pin, I get this output on the console:

start

done

e

start

done

ne

start

done

one

start

done

done

start

done

Sometimes I get more garbage. Another problem is (what I suppose being tied to this one above) I realized that if I have bunch of IPs (eg. VIP stuffs) in my NIOS, the reset does not do full reset, or so. If there are many IPs the reset does not work. I have to hit again the "run as NIOS hw", then works.

Does anyone of you have some useful hint to these problems?

7 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Are you sure the problem isn't just that whatever is displaying the serial port data is missing the first characters of each block?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Perhaps I don't understand you well, but I think there nothing is missing, but there are unwanted additional characters, garbage. Maybe I was not accurate enough, so I repeat the console output:

    <I run the software>

    start

    done

    <I hit the reset button>

    e

    start

    done

    <I hit the reset button>

    ne

    start

    done

    <I hit the reset button>

    one

    start

    done

    ... and so on.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Are you running out of onchip memory ? If you are , try enable_alt_load_copy_rwdata, else the .rwdata not initialize may cause this.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    leen,

    I confirm enable_alt_load_copy_rwdata works in 9.1sp2. The PCIe reset would reset my nios II and it wouldn't recover without this change. Now I can reboot the PCIe root complex and the nios II firmware restarts properly.