Problem with SPI Clock - New Board

Technical questions regarding the XTC tools and programming with XMOS.
jmag99
Active Member
Posts: 35
Joined: Tue Jul 20, 2010 9:45 pm

Problem with SPI Clock - New Board

Post by jmag99 »

I have a new board I am trying to bring up. It uses the XS1-U8A. I am seeing a constant 2.5MHz on X0D10, even when running the debugger. I am trying to re-use this pin in my application, but all I can see is the clock on it. If I put the XMOS into reset, the clock goes away. Stopping the debugger has no effect, the clock continues. I have tried bringing MSEL2 and MSEL3 low just to try to disable SPI boot, but this had no effect. Any ideas?


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

Post by sethu_jangala »

If you have designed you development board similar to U8 development board (DJ Kit), you need to make x0D14 High to use all the pins in your application that are used by SPI flash. Have a look at the DJ KIT schematics for more details.
jmag99
Active Member
Posts: 35
Joined: Tue Jul 20, 2010 9:45 pm

Post by jmag99 »

I don't think that is the solution, as this custom board does not have that circuit. That would not cause the clock to continue after boot. This board is modeled after the MFA design. It uses the SPI pins (except CS) for other functionality after boot.
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

jmag99 wrote:I don't think that is the solution, as this custom board does not have that circuit. That would not cause the clock to continue after boot. This board is modeled after the MFA design. It uses the SPI pins (except CS) for other functionality after boot.
Is it possible to share the schematics of your board to see what is causing issue in your case?
jmag99
Active Member
Posts: 35
Joined: Tue Jul 20, 2010 9:45 pm

Post by jmag99 »

I don't believe hardware could cause this... there is nothing on the X0D10 except the spi flash and an I2C SDA line (which is currently connected to nothing. This is the line that has a 2.5MHz clock coming out of it from the xmos processor, even after booting.
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

X0D10 is port 1C, which is the clock port for SPI ROM boot
(SCK); the boot code programs it to a 2.5MHz non-stop clock.
First of all, this means your mode pins are set to boot from
SPI, so something is wrong in your circuitry to set "debug mode"
(i.e., "don't boot" mode).

Secondly, it also means boot from SPI was unsuccessful: if
reading from SPI worked fine, it will disable the clock. Three
more-or-less common causes:
1) Your flash isn't programmed, or programmed with garbage
(for example, forgot to bit reverse the bytes); the "count" word
of the boot image will be a huge number, and you get an
exception when trying to write to 0x20000.
2) The checksum at the end doesn't match; maybe your
board is really noisy. The rom code doesn't disable the SPI
ports in this case.
3) Your CPU crashed for another reason, e.g. the system clock
isn't stable.