How to recover OTP boot code in startkit

All technical discussions and projects around startKIT
darshan2210
Member++
Posts: 22
Joined: Tue Jan 24, 2017 10:47 am

How to recover OTP boot code in startkit

Postby darshan2210 » Wed Jun 07, 2017 11:55 am

Hello ,
I am using Xmos Startkit.
I am working on one project on startkit from 6 month,
But after last change in my code in Xtime composer studio i got some trouble .
My code builds and works well in software simulation but if i use flash option to write code in flash then ,
After Flashing done my device runs as per my code but the issue arise is my startkit would not program or flash again .And also runtime Debug and Run Option not working they all seem error :
'' xrun: First stage multi-node boot failed, please check XN file and Xmos link connectivity"

And then aslo tried that startkit by loading my old ok code but still same error arise.
In this problem i damaged my TWO startkits .
And my old ok code and new fresh startkit works good .
Is there any problem in OTP memory section?

What will i do Please suggest me ?
User avatar
mon2
XCore Legend
Posts: 1230
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Wed Jun 07, 2017 12:33 pm

darshan2210
Member++
Posts: 22
Joined: Tue Jan 24, 2017 10:47 am

Postby darshan2210 » Wed Jun 07, 2017 12:57 pm

I have already tried that but same issue arise.
User avatar
mon2
XCore Legend
Posts: 1230
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Wed Jun 07, 2017 1:04 pm

From some quick experiments we did with the StartKit a while ago, we recall confirming that the OTP is already programmed at the factory (XMOS) with the LED demo. That is, we removed the onboard flash memory device off the circuit board and the LED demo still continued to work. So we believe it is not possible to alter this OTP memory by accident.

If you follow the above advice, do you see the XMOS LED demo working like it does on a fresh StartKit ? Only then will you have the faulty flash memory device bypassed if the XMOS LED demo starts to work. Then you can continue to use the xflash tools to reflash the same external flash memory. Recommend to erase the external flash memory once you have control.

Recommend to code up some simple custom LED blinky code and then flash onto the same external flash device to confirm that you have resolved the issue.
darshan2210
Member++
Posts: 22
Joined: Tue Jan 24, 2017 10:47 am

Postby darshan2210 » Wed Jun 07, 2017 1:31 pm

I have tried to erase external flash by Command xflash --target startkit --erase-all .
But still i got error like ,in image .

Image
darshan2210
Member++
Posts: 22
Joined: Tue Jan 24, 2017 10:47 am

Postby darshan2210 » Wed Jun 07, 2017 1:51 pm

And also tried by desoldering flash Chip. Default code of LED light dimming is running that time.
User avatar
mon2
XCore Legend
Posts: 1230
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Wed Jun 07, 2017 2:10 pm

What if you create or import an existing project supplied from XMOS and then flash onto the chip ? Does that work ? If you can remove the flash chip and it works then the issue looks to be only with the target flash chip or the definition inside your XN file so best to import a factory demo. Another idea is to source a fresh blank and solder onto your board but you should review the original p/n and find the same or a clone. Most SPI devices share the same set of industry wide SPI commands.
User avatar
mon2
XCore Legend
Posts: 1230
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Wed Jun 07, 2017 2:58 pm

Another idea - you mentioned you have a more StartKits ? Take a custom code that you know works on the fresh (working) StartKit and remove this external flash device and solder onto a non-working (older) StartKit. Does the older StartKit now work like the new one ? If yes, it is all about the external flash and the developer referenced earlier in this thread is forcing the external flash to be not detected upon power up so any corrupt code inside this flash device is no longer read. Then you should be able to correct the issue / erase or write new firmware.
darshan2210
Member++
Posts: 22
Joined: Tue Jan 24, 2017 10:47 am

Postby darshan2210 » Wed Jun 07, 2017 3:29 pm

Ok mon2 thanks for your support.. i will try that you said .
darshan2210
Member++
Posts: 22
Joined: Tue Jan 24, 2017 10:47 am

Postby darshan2210 » Thu Jun 08, 2017 6:56 am

hello ,
My problem was solved..
Feeling happy ..
Thanks a lot to mon2 ..
Good support from XMOS team ..

I have applied solution of this link but by doing one or two extra step.
viewtopic.php?t=2820

Steps Followed as listed below ,

-Disconnect startkit from usb cable and any power supply.
-Connect CS pin from spi flash (pin 1) to 3.3V from header J6 pin 4 by thin jumper cable like FRC
-Keep CS pin connected and power the xmos from usb port.
-Wait until the 9 leds are glowing on and off
- Now Disconnect that Extra jumper cable which we have added between spi flash (pin 1) to 3.3V by cutting with wire cutter safely
at that time device should remain power on.
-Now Flash Startkit with the new program
-Problem should be resolved .

Who is online

Users browsing this forum: No registered users and 3 guests