Forum Discussion
Altera_Forum
Honored Contributor
20 years agoCF Issues
Hey all, I'm now running into some problems with integrating the compact flash. I've read through all the forum posts regarding this area that I could find here, and they've helped ...
Altera_Forum
Honored Contributor
20 years agoHi,
We have had many woes with the compact flash interfaces. The best cards so far seem to be the Kingston 4GB cards. The following code will initialise them in IDE mode, even if they are already inserted: //this is required to start the CF in IDE mode void CF_Reset() { alt_u32 cf_status; //reset cf_status = ALTERA_AVALON_CF_CTL_STATUS_RESET_MSK; IOWR(CFLASH_CTL_BASE, 0, cf_status); Sleep(100); //let it reset cf_status = CF_POWER_ON; //power up IOWR(CFLASH_CTL_BASE, 0, cf_status); Sleep(100); //let it power up //get status cf_status = IORD(CFLASH_CTL_BASE, 0); printfEx("CF Status: %ld\n", cf_status); } Regards, Richard