Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

could not write register in CF card

first of all, insert the CF card

step 1: use full_feature option, add a cf controller, assign pins, download

step 2: code in sample.c

IOWR_ALTERA_AVALON_CF_IDE_SECTOR_NUMBER(ide_base,ucWrite);

ucRead = IORD_ALTERA_AVALON_CF_IDE_SECTOR_NUMBER(ide_base);

if(ucWrite != ucRead)

printf("Error, ucWrite = 0x%x, ucRead = 0x%x\n", ucWrite, ucRead);

step 3: Run!

but unfortunately, Error information has been printed:

"Error, ucWrite = 0x1, ucRead = 0xFF"

i could not find what is wrong....

is there some hardware

so i ask for your help

thank u

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Did you enable the power to CF with control reg?

    Try attach a scope to check the signals.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by hippo@Jun 30 2006, 10:06 AM

    did you enable the power to cf with control reg?

    try attach a scope to check the signals.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16548)

    --- quote end ---

    --- Quote End ---

    thank you for your help

    Before i read CF register i have enabled power.

    i found that the problem might be about the pins assigned. i will check it.