Is there some Xc library function to reboot the Xmos device through software (not a JTAG command)?
I got the USB flash bootloader/firmware update working and it would be nice to reboot the device without unplugging the device and plugging it back in.
I noticed even on the XMOS IDE tools that once you flash it you need to unplug the XMOS XC-1A and plug it back.
Reboot/Soft Reset possible?
-
- XCore Addict
- Posts: 162
- Joined: Thu Dec 31, 2009 8:51 am
-
- Respected Member
- Posts: 363
- Joined: Thu Dec 10, 2009 10:17 pm
Well the chips seam to reset when you write to some PLL setting register. Look around a bit and you should find a few lines of assembler that reads the register and then writes back the same value and supposedly that causes the chip to reset. I have no idea if this is a silicon bug or actually intentional, but it can be useful.
-
- Member++
- Posts: 25
- Joined: Mon Jan 18, 2010 3:36 pm
You can write a function for this:
Take a look at http://www.xmoslinkers.org/forum/viewto ... ?f=4&t=293
Or in short:
But i got no idea how you could possibly do this immediately after the program has been burned into the flash.
Take a look at http://www.xmoslinkers.org/forum/viewto ... ?f=4&t=293
Or in short:
Code: Select all
#include <xs1.h>
void chipReset(void)
{
unsigned x;
read_sswitch_reg(get_core_id(), 6, x);
write_sswitch_reg(get_core_id(), 6, x);
}
-
- XCore Addict
- Posts: 162
- Joined: Thu Dec 31, 2009 8:51 am
I tried this but it doesn't seem to work on the XC-1A.
Is something to do with the FTDI 2232D JTAG?
I already have the firmware burned to flash and a reset by unplugging the usb cable and plugging it back in resets it and loads the new flash and I verified this works.
However,
Does not seem to reset my XC-1A device.
Has anyone else tried it?
Is something to do with the FTDI 2232D JTAG?
I already have the firmware burned to flash and a reset by unplugging the usb cable and plugging it back in resets it and loads the new flash and I verified this works.
However,
Code: Select all
void chipReset(void)
{
unsigned x;
read_sswitch_reg(get_core_id(), 6, x);
write_sswitch_reg(get_core_id(), 6, x);
}
Has anyone else tried it?
-
- XCore Addict
- Posts: 165
- Joined: Wed Feb 10, 2010 2:32 pm
This is the intended operation. When the PLL is reprogrammed it's possible to get short clock pulses which are out of spec. for the device. So to avoid problems when the PLL is reprogrammed, the chip is reset.Berni wrote:Well the chips seam to reset when you write to some PLL setting register. ... I have no idea if this is a silicon bug or actually intentional, but it can be useful.
-
- XCore Expert
- Posts: 968
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
-
- XCore Addict
- Posts: 162
- Joined: Thu Dec 31, 2009 8:51 am
Unfortunately it doesn't work for me with an XC-1A.
Even the XMOS IDE tools when you execute the "run / from flash" doesn't reboot the device so maybe there is something to do with the FT2232D chip. I need to physically unplug and plug it back in.
I have a XK1 also that I can try to see if that's the problem...
Anyone with an XC-1A have it working?
Even the XMOS IDE tools when you execute the "run / from flash" doesn't reboot the device so maybe there is something to do with the FT2232D chip. I need to physically unplug and plug it back in.
I have a XK1 also that I can try to see if that's the problem...
Anyone with an XC-1A have it working?
-
- XCore Addict
- Posts: 238
- Joined: Thu Dec 17, 2009 5:15 am
I plan on getting a small batch of XC-1A's, I hope...
I shall print out the XC-1A spec's and give a good
read especially where it relates to the POR feature
and wiring of the FT2232 to be sure. I know the G4
is all ported differently and the slavecores and their
master should reconfigure more gracefully. Right
now I am not sure how FT2232 is setup physically
as it may not or may be a symptom.
I shall print out the XC-1A spec's and give a good
read especially where it relates to the POR feature
and wiring of the FT2232 to be sure. I know the G4
is all ported differently and the slavecores and their
master should reconfigure more gracefully. Right
now I am not sure how FT2232 is setup physically
as it may not or may be a symptom.
-
- XCore Addict
- Posts: 165
- Joined: Wed Feb 10, 2010 2:32 pm
Resetting the XS1 device by writing to the PLL will reset the XCore. It will not reset external devices unless they are specifically reset by the boot code running on the XCore.kster59 wrote:Unfortunately it doesn't work for me with an XC-1A.
On the XS-1A board from the schematics it looks like the the FT2232D is reset independently.
-
- XCore Addict
- Posts: 162
- Joined: Thu Dec 31, 2009 8:51 am
I'm using the XC-1A. I don't think there's any peripherals that need to be reset unless the XMOS device is being held in JTAG debug mode.
If I run a program and that program updates the flash then executes a reset of the core, it should load the newly just written program into the flash shouldn't it?
On the XC-1A my program writes the update fine but I need to unplug it and plug it back into the USB before it will boot the updated code.
If I run a program and that program updates the flash then executes a reset of the core, it should load the newly just written program into the flash shouldn't it?
On the XC-1A my program writes the update fine but I need to unplug it and plug it back into the USB before it will boot the updated code.