A question on XDK example code

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
ictzhanglei
New User
Posts: 3
Joined: Mon Apr 18, 2011 10:05 am

A question on XDK example code

Post by ictzhanglei »

I tried to run the touch screen example code in XDK.

I find one function _done as follows:
//
void _done(void)
{
void (*fp)(void) = (void(*)(void))0xffffc000;
(*fp)();
}
//

However, it seems to me that no others call this function. But, if you comment it and run, the output on the screen seems wrong.

Can someone explain me what this func used for? What is the function at oxffffc000.

Thanks.

Ray@BJ


User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

ffffc000 is the reset vector in the ROM. Jumping there like this
is not a good way to restart, if it works at all, because none of
the resources are reset; you should do a reset by writing to the
core PLL regs.