- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
}
링크가 복사됨
2 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
