Page 1 of 1
libnds-1.3.1 and freeze in fifoInit
Posted: Fri Dec 19, 2008 1:23 pm
by z.g
for some reason i need that arm7 binary targeted not into wram but into main ram in my project.
but then i changed target place for arm7 to main ram, there is frezze happens inside fifoInit while loop on arm7 side.
freeze happens on real hardware (i try on r4 and ak rpg). on no$gba all works fine.
small
example.
where is problem?
Re: libnds-1.3.1 and freeze in fifoInit
Posted: Fri Dec 19, 2008 1:38 pm
by eKid
Putting the ARM7 program in main ram can cause some pain...
I know fifoInit syncs both processors somehow. If both arm7 and arm9 are running from main ram, then the arm9 will be
frozen until the arm7 goes to sleep (I think it may be selectable which processor has priority). The arm7 will never go to sleep because it is busy trying to sync with the arm9 (which is stuck).
Re: libnds-1.3.1 and freeze in fifoInit
Posted: Fri Dec 19, 2008 3:27 pm
by WinterMute
z.g wrote:for some reason i need that arm7 binary targeted not into wram but into main ram in my project.
This setup is not supported. Running your arm7 binary in main RAM is ill advised given that both processors cannot access main RAM simultaneously.
Re: libnds-1.3.1 and freeze in fifoInit
Posted: Fri Dec 19, 2008 3:27 pm
by z.g
eKid wrote:I know fifoInit syncs both processors somehow. If both arm7 and arm9 are running from main ram, then the arm9 will be frozen until the arm7 goes to sleep (I think it may be selectable which processor has priority). The arm7 will never go to sleep because it is busy trying to sync with the arm9 (which is stuck).
you are right. replacing
Code: Select all
for(delaycount=0;delaycount<delay;delaycount++) {}
to
solve my problem. executing on arm7 goes away from main ram and arm9 can execute own code.
so why did blank cycle used instead swiDelay in libnds?
Re: libnds-1.3.1 and freeze in fifoInit
Posted: Tue Jan 06, 2009 5:10 am
by GrizzlyAdams
As an alternate to running your arm7 from main ram consider dedicating one or two banks of vram (C & D) to the arm7. This avoids the bus arbitration (AFAIK) and allows you to use an unmodified libnds.