Hey guys,
I'm having quite a bit of trouble flashing my program onto my device. I developed a board with an XS1-L2 chip on it. The board contains an AT25DF041A flash memory. My code runs correctly on my device if I am connected via the USB port and use the 'Run As Xcore application' from the XDE. However, I get errors every time I try to use the option 'Flash As...'. I've also tried running XFLASH from the command line to no avail. The error says:
Error: F03013 Failed to complete flash programming.
It looks like the XDE is trying to flash it for ~ 30 seconds before the error message comes up.
I've attached the most recent XN file I've tried. I've tried many different permutations of the XN file based on examples I've found, but haven't had any luck. I believe the problem is most likely with the XN file. The SPI port assignments are definitely correct and match the board.
Anyone have any suggestions on what the XN file should look like for this case?
I've submitted a ticket to XMOS support but haven't heard back yet.
Thanks!
Flashing XS1-L2
-
- Junior Member
- Posts: 4
- Joined: Tue Sep 11, 2012 7:21 pm
-
- Member++
- Posts: 31
- Joined: Mon Feb 06, 2012 11:42 pm
I'm not sure if this is the same problem but I was having similar trouble. I would test the code using the "Run As Application" method and then it wouldn't let me write it to the flash. After messing around with it for awhile this worked:
-Assuming the flash chip is correctly connected
1. If you just started XDE and you haven't programmed the chip yet (basically, you just turned your computer on and you just put power to your chip)
2. Build the program and then flash it to the SPI mem
If that doesn't work:
1. Build the program
2. Run as Application
3. Once you confirmed that it works click the STOP button (if the STOP button's greyed out then rerun as an application and try to hit it)
4. Power cycle the chip (just pull the power pins out and put back)
5. Now try to Flash to Memory
If I try to do it in another order I get a problem. This doesn't happen on the development boards, just my custom board. Even though it seems to be connected identically.
-Assuming the flash chip is correctly connected
1. If you just started XDE and you haven't programmed the chip yet (basically, you just turned your computer on and you just put power to your chip)
2. Build the program and then flash it to the SPI mem
If that doesn't work:
1. Build the program
2. Run as Application
3. Once you confirmed that it works click the STOP button (if the STOP button's greyed out then rerun as an application and try to hit it)
4. Power cycle the chip (just pull the power pins out and put back)
5. Now try to Flash to Memory
If I try to do it in another order I get a problem. This doesn't happen on the development boards, just my custom board. Even though it seems to be connected identically.
-
- Respected Member
- Posts: 395
- Joined: Tue May 18, 2010 12:25 am
1) Put the Link delays as at least 4,4 (probably irrelevant, but still better to have a slower link, 4 is minimum you should use).
2) When I was getting my board to work, I had to define the frequencies manually in the node line (although I did use a 500 MHz device)
Generally, a program not flashing ended up being a hardware problem for me. However, I use a different flash chip.
2) When I was getting my board to work, I had to define the frequencies manually in the node line (although I did use a 500 MHz device)
Code: Select all
<Node Id="0" InPackageId="0" Type="XS1-L1A" Oscillator="20MHz" SystemFrequency="500MHz" ReferenceFrequency="100MHz">
-
- XCore Expert
- Posts: 844
- Joined: Sun Jul 11, 2010 1:31 am
The internal links on an L2 work fine with 0,1 (which is what is inrp181 wrote:1) Put the Link delays as at least 4,4 (probably irrelevant, but still better to have a slower link, 4 is minimum you should use).
the default L2 XN file, too).
-
- Junior Member
- Posts: 4
- Joined: Tue Sep 11, 2012 7:21 pm
Thank you! Strangely enough, defining the Oscillator for Node 0 made everything work. Even stranger, defining the oscillator in both Node 0 and Node 1 did not work. I have no idea why this is the case.rp181 wrote: 2) When I was getting my board to work, I had to define the frequencies manually in the node line (although I did use a 500 MHz device)
Generally, a program not flashing ended up being a hardware problem for me. However, I use a different flash chip.Code: Select all
<Node Id="0" InPackageId="0" Type="XS1-L1A" Oscillator="20MHz" SystemFrequency="500MHz" ReferenceFrequency="100MHz">
-
- Junior Member
- Posts: 4
- Joined: Tue Sep 11, 2012 7:21 pm
While this didn't fix my flashing problem, I want to chime in and say I have the same problem. I actually put a reset switch on my board to avoid constantly plugging/unplugging the power supply on the board. For all of the revs of the board I'm working on (on the 4th one now), I've had this issue. In my designs (based heavily on reference schematics), the XDE seems incapable of resetting the device. I don't know if I'm hooking up some of the FT2232D pins wrong or what. Might be a good topic for another post...DrNO wrote:I'm not sure if this is the same problem but I was having similar trouble. I would test the code using the "Run As Application" method and then it wouldn't let me write it to the flash. After messing around with it for awhile this worked:
-Assuming the flash chip is correctly connected
1. If you just started XDE and you haven't programmed the chip yet (basically, you just turned your computer on and you just put power to your chip)
2. Build the program and then flash it to the SPI mem
If that doesn't work:
1. Build the program
2. Run as Application
3. Once you confirmed that it works click the STOP button (if the STOP button's greyed out then rerun as an application and try to hit it)
4. Power cycle the chip (just pull the power pins out and put back)
5. Now try to Flash to Memory
If I try to do it in another order I get a problem. This doesn't happen on the development boards, just my custom board. Even though it seems to be connected identically.
-
- Junior Member
- Posts: 4
- Joined: Tue Sep 11, 2012 7:21 pm
Just a correction. I do need to define the Oscillator for both nodes in order for the program to actually run correctly upon boot. XFLASH will complete successfully with only the oscillator for node 0 defined, but my program would not run correctly until I defined it for both nodes.Rdragone wrote:Thank you! Strangely enough, defining the Oscillator for Node 0 made everything work. Even stranger, defining the oscillator in both Node 0 and Node 1 did not work. I have no idea why this is the case.rp181 wrote: 2) When I was getting my board to work, I had to define the frequencies manually in the node line (although I did use a 500 MHz device)
Generally, a program not flashing ended up being a hardware problem for me. However, I use a different flash chip.Code: Select all
<Node Id="0" InPackageId="0" Type="XS1-L1A" Oscillator="20MHz" SystemFrequency="500MHz" ReferenceFrequency="100MHz">
-
- Respected Member
- Posts: 395
- Joined: Tue May 18, 2010 12:25 am
Ya, I don't recommend working from the defaults of the different programs presented. That was causing me a lot of issues, until I started from scratch using the Tools User Guide to write an XN file.