Help with memory mode and AT45DB161D
Hi, I'm new in GCC and I have one question, is It possible use a AT45DB161D (spi flash memory) to run the code?, maybe in XMMC. If its possible, what should I do?.
Datasheet: http://www.ibr.cs.tu-bs.de/trac/inga/chrome/site/datasheets/Atmel_AT45DB161D.pdf
Sorry for my bad english.
Datasheet: http://www.ibr.cs.tu-bs.de/trac/inga/chrome/site/datasheets/Atmel_AT45DB161D.pdf
Sorry for my bad english.
Comments
clkfreq: 80000000 clkmode: XTAL1+PLL16X baudrate: 115200 rxpin: 31 txpin: 30 cache-driver: spi_flash_cache.dat cache-size: 8K cache-param1: 0x1a1b1901 # 0xooiiccpp - oo=mosi ii=miso cc=sck pp=cs-protocol cache-param2: 0x18000000
#include <stdio.h> #include <propeller.h> int main(void) { int mask; mask=1<<2; DIRA=mask; while(1){ OUTA^=mask; waitcnt(CNT+CLKFREQ/2); } return 0; }
Build Status from SimpleIde
Project Directory: C:/Users/seba/Documents/asd/propeller-elf-gcc.exe -o a.out -O1 -mxmmc -I . -fno-exceptions -Dprintf=__simple_printf asd.c propeller-elf-objdump -h a.out Done. Build Succeeded! propeller-load.exe -I C:/propgcc/propeller-load/ -b MIO -p COM4 a.out -e -rLoading the serial helper to hub memory 9528 bytes sent Verifying RAM ... Loading cache driver 'spi_flash_cache.dat' 1464 bytes sent Loading program image to flash 528 bytes remaining 528 bytes sent Loading the flash loader to EEPROM via hub memory 4628 bytes sent Verifying RAM ... OK Programming EEPROM ... OK Verifying EEPROM ... OK
All ok, but my code not running but If I put the memory type in COG, works perfectly.
Any suggestions?
What memory do you recommend?
Just make a copy of spi_flash_cache.spin and modify it for the Atmel chip. I'll attach a copy of the current source to this message. Let me know if you have any questions about the code. You'll need to modify erase_4k_block_handler and write_data_handler to match the way the Atmel chip handles writing to the flash.
Thanks for the tip, I didn't know that Atmel no longer makes this chips.
Can I load my code from a SD memory in FAT?