I have an application which is working as expected. I use an AT45DB321 for file system and sw upload. I relinked the application to start at 0x1000. I used the Axiom programmer to program both .ELFs into flash. All seems to work fine. I set both the uTaskerConvert and the bootloader for no encryption. Using the "Administration Page" in the target, it appears that I can upload the new "H_Upload.bin" successfully. When the target resets (either from the software or a power cycle) the old program is still running. I modified the boot loader code as follows to account for a second device on the SPI pins and because I use the nWP pin on the memory chip.
extern int fnConfigSPIFileSystem(void)
{
DDRAS |= PORT_AS_BIT3;
_SETBITS(AS, PORT_AS_BIT3); // raise RC531 nCS ewan
DDRAN |= PORT_AN_BIT7;
_SETBITS(AN, PORT_AN_BIT7); // raise AT45DB nWP ewan
PORTQS |= QSPI_CS0_LINE;
DDRQS |= QSPI_CS0_LINE; // Drive CS line high
PQSPAR |= 0x0015; // Set QSPI_CLK, QSPI_DIN and QSPI_DOUT on QS port
QMR = ((QSPI_MSTR | QSPI_8BITS) | 2); // set mode and fastest speed
if (fnCheckAT45dbxxx() == NO_SPI_FLASH_AVAILABLE) {
QMR = 0; // disable SPI if no chip connected
return 1;
}
return 0;
}
The affected ports work fine in the application. Any clues?
Regards,
Ewan.