Author Topic: Spartan-6 CCLK switching to 50 MHz -- why?!  (Read 945 times)

0 Members and 1 Guest are viewing this topic.

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6974
  • Country: de
Spartan-6 CCLK switching to 50 MHz -- why?!
« on: June 20, 2020, 09:10:10 am »
I'm encountering yet another Spartan-6 mystery... Bringing up my first self-designed FPGA board, after various earlier projects which used off-the-shelf boards from Numato. I can configure it nicely via JTAG, using the iMPACT software. iMPACT also states that indirect programming of an attached SPI flash ROM is successful. (Although it makes me slightly suspicious that the progress indicator only goes up to 25% during the programming; is that normal behavior?)

But the FPGA is not able to configure itself from flash when I power-cycle it; DONE won't go high. Looking at the CCLK and data lines with a scope, I see that there is plausible traffic -- but the CCLK, after about 800 cycles at 1 MHz, switches up to 50 MHz! :wtf:  I don't think I asked for that; please see the Bitgen settings in the attached screenshot. Any idea what is happening here?

Signal integrity is often mentioned as a likely culprit for configuration issues. I have indeed omitted any termination resistors on the CCLK and data lines, due to space contraints. But this is a very compact layout, with a 15 mm long CCLK trace and < 20 mm data traces. The signals look perfect at the slow 1 MHz rate, and even seem to keep up at 50 MHz. Adding improvised kind-of-termination resistors to the CCLK and flash data output lines doesn't change anything either. So I don't think compromised signal integrity is the cause.

The behaviour is fully reproducible, always occuring at the same time (after about 800 µs of 1 MHz clock pulses), and on two separate boards I have populated. I assume the 800 µs time is when the FPGA is meant to switch from its conservative startup CCLK (is that expected to be 1 MHz?) to the clock rate defined in the Bitgen properties. But where does it get the idea to select 50 MHz?!

Many thanks for your ideas!
 

Offline skip

  • Newbie
  • Posts: 6
  • Country: us
Re: Spartan-6 CCLK switching to 50 MHz -- why?!
« Reply #1 on: June 20, 2020, 07:06:35 pm »
My guess is that the Configrate is read from the SPI flash during the early part of the configuration.  If your flash isn't being read correctly at 2 Mhz (all 1's perhaps?) the clock rate will change to what it read.

Are you using an officially supported SPI chip?  If not that could also be the problem (3 byte addressing vrs 4 byte for example).

Good Luck!
 
The following users thanked this post: ebastler


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf