fl_connect() fail problem?

Technical questions regarding the XTC tools and programming with XMOS.
porsche
Member
Posts: 15
Joined: Fri Nov 11, 2011 9:57 am

fl_connect() fail problem?

Post by porsche »

hi hackers:

The system can be boot from spi flash.

I want to upgrade images in the flash, so I follow the tool guide demo code.
But I found fl_connect() always fails, always return nonzero. I check the bus using logic-analyzer.
The XMOS first send hex code AB to wakeup SPI flash.
Then send 9F command to read ID. And SPI give 1F 43 00 00 code. Those code match atmel AT25DF010 spec.
But 9F command send 4~5 times, it is strange!

in this condition, what cause fl_connect() to fail?


User avatar
davelacey
Experienced Member
Posts: 104
Joined: Fri Dec 11, 2009 8:29 pm

Post by davelacey »

Only a few flash chips are supported by the library by default (see https://www.xmos.com/list-flash-devices ... ?support=1) . The AT25DF010 isn't in that list so libflash won't detect it. You have to add your own spec of the chip in your code (see https://www.xmos.com/add-support-new-fl ... ?support=1).

Dave
porsche
Member
Posts: 15
Joined: Fri Nov 11, 2011 9:57 am

Post by porsche »

hi Hacker:
Sorry, I check my flash type again, it's at25df021.
I think xmos support it.
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

There is a N (No) behind at25df021 on this page, meaning that it isn't supported by default by libflash. So you will still have to add your own specification like dave pointed out.
porsche
Member
Posts: 15
Joined: Fri Nov 11, 2011 9:57 am

Post by porsche »

hi Hacker:
I am appreciated for your guide.
The libflash can work.
Thank you!