Hello,I loaded the naftpapp into ram on my own board and then tried to ftp a rom.bin to flash. The address selection line seems to be right shifting all of the address values by 1 place. So that (from the flash chip) A3-A2,A2->A1,A1->A0,ect…The Memory manager configuration register for chip select 0 says it is set for a 16 bit port, and we have designed the board as per the specs of net silicon where the A0 line from the processor is left unused and A1 is attached to A0 on the 16 bit flash chip. Does anyone know what is going on? I am using a NET+50 cpu, NET+OSv4.0, and Green Hills 2.1. Thank you in advance, Mr. Ryan
You really need to take care when writing drivers for flash. Commands sent to flash must be shifted by the amount of bits necessary (1 for 16 bits flash and 2 for 32 bit flash). If you have two 16 bits flash (common situation for a 32 bits bus) remember to put the same command two times, but shifting one of them by 16. For instance: one 16 bits chip: #define FlashWord(usValue) usValue #define FLASHDATA unsigned short FLASHDATA *tAddr, tRet; tAddr = (FLASHDATA *) ((BaseAddr) | (addr_cmd << 1)); *tAddr = FlashWord(usCmd); or tRet = *tAddr; two 16 bits chip: #define FlashWord(usValue) ((usValue) + ((usValue) << 16)) #define FLASHDATA unsigned long FLASHDATA *tAddr, tRet; tAddr = (FLASHDATA *) ((BaseAddr) | (addr_cmd << 2)); *tAddr = FlashWord(usCmd); or tRet = *tAddr; Bye Marcelo Barros