Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Garbage at reset

Altera_Forum
Honored Contributor II
1,274 Views

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 

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?
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
400 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
400 Views

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> 

start 

done 

<I hit the reset button> 

ne 

start 

done 

<I hit the reset button> 

one 

start 

done 

... and so on.
0 Kudos
Altera_Forum
Honored Contributor II
400 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
400 Views

I'm using on chip memory.

0 Kudos
Altera_Forum
Honored Contributor II
400 Views

Try enable_alt_load_copy_rwdata , the setting is in BSP Editor

0 Kudos
Altera_Forum
Honored Contributor II
400 Views

I will try this, thanks.

0 Kudos
Altera_Forum
Honored Contributor II
400 Views

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.
0 Kudos
Reply