dubeg stops at sleep

Hi.

I am building some simple code in c, upon microblaze softcore processor.

When i debug it stops at sleep(1) function and never execute the rest of the code.

Why it is actually stops?
What may i look for to find why it stops in this case?

Thanks!
Last edited on
Do you have a link to the documentation for this sleep function?

Assuming it's,
https://www.xilinx.com/content/dam/xilinx/support/documents/sw_manuals/xilinx2021_2/ug984-vivado-microblaze-ref.pdf
Sleep3 ... MicroBlaze is in sleep mode after executing a SLEEP instruction or by setting Reset_Mode[0:1] to 10, all external accesses are completed, and the pipeline is halted


When an MBAR instruction is executed to enter sleep mode and MicroBlaze has completed all external accesses, the pipeline is halted and either the Sleep, Hibernate, or Suspend output signal is set.


It seems that in this architecture, the functionality you're calling may be referring to a sleep mode, and not a "don't do anything for X amount of time" function. But I am only guessing.

Edit:
https://support.xilinx.com/s/question/0D52E00006hpZcRSAU/microblaze-sleep?language=en_US
MicroBlaze doesn't have a timer. So no sleep() function without a timer.

You can add a timer into the system and implement your sleep() function.


Edit: Read the rest of that thread. It's possible that you are calling the right function, but a timer is still required that you may not have?
Last edited on
Yes , i am aware of this thread. i do have a timer but it is
needed to FreeRTOS only.

I have ddr in my design, it may be tied to the problem.

Topic archived. No new replies allowed.