Problem on flash access?

Technical questions regarding the XTC tools and programming with XMOS.
jerryXCORE
Experienced Member
Posts: 65
Joined: Tue Apr 30, 2013 10:41 pm

Problem on flash access?

Post by jerryXCORE »

I got a problem to access flash

Code: Select all

int value, psize; fl_BootImageInfo b;
value =fl_connectToDevice (SPI , myFlashDevices , sizeof ( myFlashDevices )/ sizeof ( fl_DeviceSpec )); printintln(value);
psize = fl_getPageSize ();  printintln(psize);
value = fl_getFactoryImage (b);  printintln(value);
value = fl_getNextBootImage (b); printintln(value);
* A few month ago, everything is ok.
* But now:
--- fl_connect() return zero: means success
--- fl_getPageSize () return 256: means success
--- fl_getFactoryImage() return 1: means fail
--- fl_getNextBootImage() return 1: means fail

How could it be, any hint?


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

Post by infiniteimprobability »

There's a rather obvious explanation - you have no valid boot image or upgrade image resident in the flash.

Although I'm sure you already thought of this... Does it boot from flash OK using the current image?
jerryXCORE
Experienced Member
Posts: 65
Joined: Tue Apr 30, 2013 10:41 pm

Post by jerryXCORE »

Yes, you right! I misunderstood the flash logic:
* I erased all image accidentally by using fl_startImageReplace().
* But I though there should be at least one image remaining.

Thank for your hint!