Slicekit xflash strange behaviour. Is the board broken?

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
Chendy
Active Member
Posts: 46
Joined: Tue Nov 02, 2010 4:53 pm

Slicekit xflash strange behaviour. Is the board broken?

Post by Chendy »

Hi,

I have wrote a simple test app that outputs a character using serial (using generic uart) every second. I then connect the tx_pin to my usb_to_serial converter and monitor the character using a serial terminal on my laptop. When I press compile and run it works normally. Simple.

I then use XFLASH to load the code into the board permanently, it goes through its operation of verifying the writes and then displays that the transaction was successful. I am using the standard Slicekit USB JTAG converter. Everything seems to be fine:

Code: Select all

Warning: F03098 Factory image and boot loader cannot be write-protected on flash device on node "0".

Site 0 has started.         
Site 0 has type 015.        
Site 0 write    0x00000000. 
Site 0 verified 0x00000000. 
...
...
Site 0 write    0x00007400. 
Site 0 verified 0x00007400. 
Site 0 has finished.        
xflash succeeded
Here's where it gets weird:

If I leave the USB JTAG converter connected, ensure that no program is running in xTIMEcomposer (by quiting xTIMEcomposer) and then power cycle the slicekit, the app works. I can repeatably power cycle the Slicekit (whilst the JTAG is still connected) and the app works fine everytime. BUT if I remove the usb cable from JTAG, or remove the JTAG, when power cycled the Slicekit, it doesn't work (the pin can toggles randomly and outputs masses of jibberish)... Boot from flash only works with the JTAG connected to the laptop (and not even with a JTAG connected to usb charger to provide 5V). What is going on?!

e.g.

First XFLASH is called from xTIMEcomposer, and then I close xTIMEcomposer, then...

1. If JTAG + cable all left in place (and slicekit power cycled) = works
2. If cable removed (and slicekit power cycled) = doesn't work
3. If cable reconnected (and slicekit power cycle) = works

I'm about to buy another Slicekit to make sure, as this seems wrong?! Just wondering if there was anything I have missed. I have heard of pin compatibility issues (on core 0 with the SPI?), but I have tried different pins on both TILE_0 and TILE_1, which all reproduce this behaviour. I am currently using:

Code: Select all

on stdcore[TILE_1] : out port p_tx = XS1_PORT_1A; //  X1D0 CIRCLE P1A0
I have tried with 2 different XMOS JTAGS; same behaviour. Unfortunately I don't have access to a second Slicekit yet.

???

Chendy


User avatar
boeserbaer
Active Member
Posts: 51
Joined: Fri Jan 29, 2010 4:36 pm

Post by boeserbaer »

Hi Chendy,

I am not sure that it applies to your problem, but I ended up modifying my slice kit board to bypass the pin multiplexing of the flash spi pins (to allow applications to use the x0d0,d1,d10,d11 if I remember correctly). It has been a long time, so I don't remember the exact details, but it made my board work from flash.

Looking at the schematic, remove c59, move r39 to c39's pads. this will leave u18b in reset, causing S=1 and permanently selecting the SPI flash. NOTE: x0d0,d1,d10,d11 will not be available for other usage. However Flash will be avail for application usage (I needed that).

Best Regards, Mike
User avatar
Chendy
Active Member
Posts: 46
Joined: Tue Nov 02, 2010 4:53 pm

Post by Chendy »

Thanks for the tips Mike, I will look into this.

Unfortunately, I have received a new Slicekit but the problem remains?!

I'm now testing the stock 'app_slicekit_com_demo' 1.0.4rc0 pulled from xSOFTip with xTIMEcomposer. The problem booting from flash as explained by my first post remains. I am using a new JTAG on a new Slicekit. I am building 'Release' and flash the release binary.

???

Chendy
User avatar
Chendy
Active Member
Posts: 46
Joined: Tue Nov 02, 2010 4:53 pm

Post by Chendy »

... if anybody has a slicekit and could confirm whether they could flash their slicekit with the above example with it then successfully working, I would be very grateful

Chendy
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

Chendy wrote:... if anybody has a slicekit and could confirm whether they could flash their slicekit with the above example with it then successfully working, I would be very grateful

Chendy
I jut had a quick try by flashing the sliceKIT with GPIO com demo and I am able to flash the kit and when I power cycle the sliceKIT, I am able to boot the demo. Not sure what is causing issue in your case. Which version of sliceKIT are you using and which version of the xTIMEcomposer tool are you using?

Sethu.
User avatar
Chendy
Active Member
Posts: 46
Joined: Tue Nov 02, 2010 4:53 pm

Post by Chendy »

If you remove the JTAG and then power cycle, does the demo still work?

If so there must be a problem with my environment. I will try and install xTIMEcomposer from a different computer.

Also, I have tried to make sure its flashing the 'Release' build. Should this matter in terms of testing whether boot from flash is working?

Thanks

Chendy
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

Chendy wrote:If you remove the JTAG and then power cycle, does the demo still work?
Yes, I tried by removing xTAG2 adapter and power cycle the device and also tried with the adapter connected. I am able to boot both the times.
Chendy wrote: Also, I have tried to make sure its flashing the 'Release' build. Should this matter in terms of testing whether boot from flash is working?
Debug build or Release build should not make any difference while booting from flash.
User avatar
Chendy
Active Member
Posts: 46
Joined: Tue Nov 02, 2010 4:53 pm

Post by Chendy »

Sorry all - False alarm - I'm an idiot

Just checked and discovered the ground connection between XMOS and the USB-Serial-Converter is dodgy. Everything is working fine. The reason it worked when the JTAG was plugged in there was a ground connection made. I guess that's what happens when you work after bed time.

Sorry and thanks to all

Chendy
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

False alarm
Happens to the best of us! Glad it's working..
User avatar
Chendy
Active Member
Posts: 46
Joined: Tue Nov 02, 2010 4:53 pm

Post by Chendy »

Thanks

... I guess I'll take an embarrassingly small problem over extremely complicated problem every time : )