Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
공지
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 토론

Configuring Cyclone IV E over serial interface - INIT_DONE don't go high

Altera_Forum
명예로운 기여자 II
1,415 조회수

Hello everyone, 

 

I'm configuring a Cyclone IV E over serial interface with a rbf file that I have stored in my MCU's flash memory. It was working fine till I replaced the rbf for a new version (larger). Now the INIT_DONE pin of the fpga won't go high. I have no idea why. It there some sort of a example code how to configure these devices over serial interface? Here's the code that I'm using. It seems to comply with the documentation. Or what could be wrong with it? Thanks for any suggestions. 

 

void fpgaConfig(void){ int i; int length; uint16_t temp; spiDAT1_t dataConfig; uint32 PC0Backup; gioSetBit(spiPORT1, SPI_PIN_SOMI, 0); // nConfig low delay(0xffff); // wait gioSetBit(spiPORT1, SPI_PIN_SOMI, 1); // nConfig high while(gioGetBit(spiPORT1, SPI_PIN_ENA) == 0); // wait until nStatus is high PC0Backup = spiREG1->PC0; spiSetFunctional(spiREG1, PC0Backup | (1U << SPI_PIN_SOMI)); // set nCONFIG as SPI pin dataConfig.CSNR = 0; dataConfig.CS_HOLD = 0; dataConfig.DFSEL = SPI_FMT_0; dataConfig.WDEL = 0; length = sizeof(designData); for(i = 0; i < length; i++) { temp = designData; spiTransmitData(spiREG1, &dataConfig, 1, &temp); } delay(0xfffff); // wait while(gioGetBit(spiPORT2, SPI_PIN_CLK) == 0); // wait until CONF_DONE is high while(gioGetBit(gioPORTB, 7) == 0); // wait until INIT_DONE is high spiSetFunctional(spiREG1, PC0Backup); // put back the original value. This is important to make reconfiguration possible }
0 포인트
2 응답
Altera_Forum
명예로운 기여자 II
651 조회수

Do you give a number of extra clocks after all configuration data has been clocked in? I usually add 64 (or so) dummy configuration clocks with 'dummy' data

0 포인트
Altera_Forum
명예로운 기여자 II
651 조회수

So it's turned out to be an error in the Device settings. The original project had different settings than the new one. It's working now again. Thanks

0 포인트
응답