Board logo

标题: 9S12XDT512的全地址范围到底是多少 [打印本页]

作者: johdon23    时间: 2008-9-9 14:17     标题: 9S12XDT512的全地址范围到底是多少

SMALL模式,CW自动生成的工程文件,在PRM文件里,是这样定义的:

/* paged EEPROM 0x0800 TO 0x0BFF; addressed through EPAGE */
EEPROM_FC = READ_ONLY 0xFC0800 TO 0xFC0BFF;
EEPROM_FD = READ_ONLY 0xFD0800 TO 0xFD0BFF;
EEPROM_FE = READ_ONLY 0xFE0800 TO 0xFE0BFF;
/* EEPROM_FF = READ_ONLY 0xFF0800 TO 0xFF0BFF; intentionally not defined: equivalent to EEPROM */

/* paged RAM: 0x1000 TO 0x1FFF; addressed through RPAGE */
RAM_FB = READ_WRITE 0xFB1000 TO 0xFB1FFF;
RAM_FC = READ_WRITE 0xFC1000 TO 0xFC1FFF;
RAM_FD = READ_WRITE 0xFD1000 TO 0xFD1FFF;
/* RAM_FE = READ_WRITE 0xFE1000 TO 0xFE1FFF; intentionally not defined: equivalent to RAM: 0x2000..0x2FFF */
/* RAM_FF = READ_WRITE 0xFF1000 TO 0xFF1FFF; intentionally not defined: equivalent to RAM: 0x3000..0x3FFF */

/* paged FLASH: 0x8000 TO 0xBFFF; addressed through PPAGE */
PAGE_E0 = READ_ONLY 0xE08000 TO 0xE0BFFF;
PAGE_E1 = READ_ONLY 0xE18000 TO 0xE1BFFF;
PAGE_E2 = READ_ONLY 0xE28000 TO 0xE2BFFF;
PAGE_E3 = READ_ONLY 0xE38000 TO 0xE3BFFF;
PAGE_E4 = READ_ONLY 0xE48000 TO 0xE4BFFF;
PAGE_E5 = READ_ONLY 0xE58000 TO 0xE5BFFF;
PAGE_E6 = READ_ONLY 0xE68000 TO 0xE6BFFF;
PAGE_E7 = READ_ONLY 0xE78000 TO 0xE7BFFF;

PAGE_E8 = READ_ONLY 0xE88000 TO 0xE8BFFF;
PAGE_E9 = READ_ONLY 0xE98000 TO 0xE9BFFF;
PAGE_EA = READ_ONLY 0xEA8000 TO 0xEABFFF;
PAGE_EB = READ_ONLY 0xEB8000 TO 0xEBBFFF;
PAGE_EC = READ_ONLY 0xEC8000 TO 0xECBFFF;
PAGE_ED = READ_ONLY 0xED8000 TO 0xEDBFFF;
PAGE_EE = READ_ONLY 0xEE8000 TO 0xEEBFFF;
PAGE_EF = READ_ONLY 0xEF8000 TO 0xEFBFFF;

PAGE_F0 = READ_ONLY 0xF08000 TO 0xF0BFFF;
PAGE_F1 = READ_ONLY 0xF18000 TO 0xF1BFFF;
PAGE_F2 = READ_ONLY 0xF28000 TO 0xF2BFFF;
PAGE_F3 = READ_ONLY 0xF38000 TO 0xF3BFFF;
PAGE_F4 = READ_ONLY 0xF48000 TO 0xF4BFFF;
PAGE_F5 = READ_ONLY 0xF58000 TO 0xF5BFFF;
PAGE_F6 = READ_ONLY 0xF68000 TO 0xF6BFFF;
PAGE_F7 = READ_ONLY 0xF78000 TO 0xF7BFFF;

PAGE_F8 = READ_ONLY 0xF88000 TO 0xF8BFFF;
PAGE_F9 = READ_ONLY 0xF98000 TO 0xF9BFFF;
PAGE_FA = READ_ONLY 0xFA8000 TO 0xFABFFF;
PAGE_FB = READ_ONLY 0xFB8000 TO 0xFBBFFF;
PAGE_FC = READ_ONLY 0xFC8000 TO 0xFCBFFF;
/* PAGE_FD = READ_ONLY 0xFD8000 TO 0xFDBFFF; intentionally not defined: equivalent to ROM_4000 */
PAGE_FE = READ_ONLY 0xFE8000 TO 0xFEBFFF;
/* PAGE_FF = READ_ONLY 0xFF8000 TO 0xFFBFFF; intentionally not defined: equivalent to ROM_C000 */

但是9S12XDT512的FLASH才512K,也就是从000000-7FFFFF???


作者: 康桥人    时间: 2008-9-10 08:55

当然不是了,000000-7FFFFF是S12X的最大的寻址空间, 片内的FLASH是分页的,每一页是16KB,READ_ONLY 0xE08000 TO 0xE0BFFF;正好是16KB


作者: johdon23    时间: 2008-9-10 09:31

每页是16K没错,可页寻址的地址范围也没问题(8000-BFFF),但我不明白的是,PPAGE的值为什么是从E0到FF?而MC9S12DG128的PPAGE却是从38到3F?这有什么规定的吗?
作者: strongchen    时间: 2008-9-10 10:58

PPAGE的范围与FLASH的大小是对应的。




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0