This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

28Fxxx Flash query problem


I'm trying to add flash support to a board that has a single 28F320C3-T
part.
I've included the Intel flash_28fxxx and generic flask packages and
provided a platform flash package as well.

To test this I've created a Redboot RAM Elf image built from cvs which I
upload and start from an older Redboot image installed a couple of years
ago on separate internal flash.

The problem is that when I run the image, it hangs in
flash_28fxxx_parts.inl flash_query function:

void
flash_query(void* data)
{
    volatile flash_data_t *ROM;
    flash_data_t* id = (flash_data_t*) data;
    flash_data_t w;

    ROM = (volatile flash_data_t*) CYGNUM_FLASH_BASE;

    w = ROM[0];

    CYGHWR_FLASH_WRITE_ENABLE();
    
    ROM[0] = FLASH_Read_ID;

    // Manufacturers' code
    id[0] = ROM[0];
    // Part number
    id[1] = ROM[1];

    ROM[0] = FLASH_Reset;

    CYGHWR_FLASH_WRITE_DISABLE();
    
    // Stall, waiting for flash to return to read mode.
    while (w != ROM[0]);
}

Using a hardware debugger to interrupt execution is it always stuck in
the while loop at the end of this function.
If I force the program counter back to the start of the function and
step though it works fine, the flash chip returns the correct
manufacturer and parts id's and I get all the Redboot 'fconfig'
commands.

Strangely, (perhaps because the code has been inlined?) if I set a
breakpoint to catch it before it goes through they don't seem to work
and it still drops through to the while loop, and the debugger gives
register locations instead of memory addresses for variable locations.

Does anybody have any ideas how to tackle this?

Thanks,

Steven Clugston


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]