Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16596 Discussions

Printf adding delay when boot

IMaim
Beginner
975 Views

I'm having a code running on NIOS and have an external IC that make a watchdog timer.  for this purpose the NIOS code make a trigger to reset the watchdog every some predefine time.

 

I connected a scope on the watchdog signal to see the behave.

In the NIOS I run a testing program that reset the watchdog (send signal on the WD) every 1.5 seconds.

When burning the program using the Small Boot Copier (Altera boot copier that use only one bank) the program run fine.

When I am using Advanced Boot Copier (boot loader that I wrote that uses two banks) I see that the first signal on the WD is received 4.8 seconds after watchdog boot . I added code to the Advanced Boot Copier to reset the watchdog. The Advanced Boot Copier reset the watchdog just before calling the application entry point. I see with the scope that the application starts sending reset signals to the watchdog after more than 3 seconds from the last watchdog reset (thus when the watchdog is active the nios is restarted).

When I started nios2-terminal at reset, to see when the application starts to print log massages, the delay sorted significant to be lass then 1 second and the watchdog did not reset the NIOS.

Moreover, I try to remove all the prints from the code. When there no prints there no problem, with the signal sent to the watchdog.

 

Do you know a way that I can use printf (using JTAG UART) that will not making such delay on startup?

 

Thanks.

0 Kudos
8 Replies
Ahmed_H_Intel1
Employee
545 Views
Hello, Can you please measure the time in the code before and after the printf function? This shouldn't take this long time.
0 Kudos
IMaim
Beginner
545 Views

1 millisecond from short printf (without parameters only printing a string).

But the problem is not in the printf time

0 Kudos
Ahmed_H_Intel1
Employee
545 Views
I am wondering if you can share the Qsys design with me -screen shoot is enough- to see what might cause this issue. BTW what is the reason of using advanced boot copier and edit it?
0 Kudos
Ahmed_H_Intel1
Employee
545 Views

The image cannot be opened, can you please attach it?

0 Kudos
IMaim
Beginner
545 Views

qsys_pic.jpg

0 Kudos
IMaim
Beginner
545 Views

​???

0 Kudos
Ahmed_H_Intel1
Employee
545 Views
Hi, I don't see something wrong in the qsys. I advise you to use the small hello world which takes shorter time to print or you can increase the NIOS II frequency to get faster response. Regards,
0 Kudos
Reply