#67775 - swzte - Fri Jan 20, 2006 8:13 am
As we know,in GBA Flash Cartridge,the Flash is 16 bits wide and 24bit addresses are squeezed through the Gampak bus.First, I want to know whether Address bit0 of the 24bit addresses is connectted to Flash Address bit0? Or Address bit1 of the 24bit addresses is connectted to Flash Address bit0?.Second, how does I get the Flash ID?Is it right this way?
*(volatile unsigned short *) (0x08000000+0x555*2)=0xaa;
*(volatile unsigned short *) (0x08000000+0x2aa*2)=0x55;
*(volatile unsigned short *) (0x08000000+0x555*2)=0x90;
FlashId=*(volatile unsigned short *) (0x08000000+0x1*2);
Or this way?
*(volatile unsigned short *) (0x08000000+0x555)=0xaa;
*(volatile unsigned short *) (0x08000000+0x2aa)=0x55;
*(volatile unsigned short *) (0x08000000+0x555)=0x90;
FlashId=*(volatile unsigned short *) (0x08000000+0x1);
*(volatile unsigned short *) (0x08000000+0x555*2)=0xaa;
*(volatile unsigned short *) (0x08000000+0x2aa*2)=0x55;
*(volatile unsigned short *) (0x08000000+0x555*2)=0x90;
FlashId=*(volatile unsigned short *) (0x08000000+0x1*2);
Or this way?
*(volatile unsigned short *) (0x08000000+0x555)=0xaa;
*(volatile unsigned short *) (0x08000000+0x2aa)=0x55;
*(volatile unsigned short *) (0x08000000+0x555)=0x90;
FlashId=*(volatile unsigned short *) (0x08000000+0x1);