Hi jimmy,
- I don't have now access to the code, maybe tomorrow, but it was very simple: I just took the atmel driver from u-boot (or linux I'm not sure, but probably from u-boot source).I also did some very minor changes just to fit into the frame of the spi-flash-writer (not any important change). You should also be aware of the 512/528 bytes issue. When I first tried to flash the Atmel flash it seemed that flashing was done well, but the booting failed. I then figured out that it is becuase the flash came as 528 bytes per page from factory.
- I added simple command at start of flash to convert it to 512 bytes per page. That is maybe the only "important" adding to code, I have made. If your flash is 512bytes then you won't need such anyway.
- Are you working with the updated sdk from TI ? Isn't there still support for the atmel in the spi-flash-writer ?
Bye,
Ran
Hi Ran:
We have solved the problems and now we can programme AT45DB321D and boot from it. The following is what I have done:
1. Configure the page size of AT45DB321D-SU to 512 bytes; then did a power cycle;
2. Modified spi-falsh-writer to support AT45DB321D.
Thank you very much for your help!
Best regards,
Jimmy
Mr. Zhang, could you give modified version of spi-falsh-writer (with support of AT45DB321D)?
My e-mail: dtp-avb@yandex.ru
---
Thanks at advance.
8357.dsp_spi_flash_writer.zipHi Alexander:
/*The follow code is to config the page size of AT45DB321D to 512 Byte.*/
// Uint8 config_cmd[4] = { 0x3d, 0x2a, 0x80, 0xa6 };
// ret = spi_xfer(slave, 32, &config_cmd[0], NULL, SPI_XFER_BEGIN);
// if (ret) {
// printf("SF: Failed to send config command %02x: %d\n", config_cmd, ret);
// return ret;
// }
// while(1); //Added by Jimmy
The attachment is the modified driver.
Please let me know if the code works.