It is not possible to be FCLKDIV 0x90 after reset. Where is the point you check it? If you use some “code generator” like for example Processor Expert, then there are automatically inserted initialization procedures. If you check the code and “after reset” means I have just stopped at the first instruction of the main() then this is not “after reset”.
Have you tried to perform mass erase/unsecure procedure by means of your debug interface or some another program like Unsecure_12 from pemicro.com. If the chip has different values in the flash from 0xFF and/or defined values in the defined flash fields and registers after this procedure and power on reset differs from guaranteed by the datasheet then I can say yes the MCU is an issue.
BDMGPR….there are two approaches of the memory> local and global. Local uses RPAPE, PPAGE,… Global uses GPAGE. Which is used depends in the case of BDM on the bit BGAE setup. If BGAE is 1 then global access is enabled and global page address is written into this register.
(Global access assembler functions do not have connection to this GLDD, GSTD,…)
So, in the case I want to access LOCAL paged space PPAGE_OFFSET then I disable/clear BGAE (BDMGPR register) (HW BDM commands) bit and use PPAGE register with offset 8000-BFFF or RPAGE with offset 1000-1FFF or EPAGE and offset 0800-0BFF.
If I want to use global address then set BGAE (BDMGPR register) and use GLOBAL address written to BDMGPR = 0x80 | global_page. Ofsset is 64k. If the BDMGPR is set to 0x80 then the space you can read is global address 00_0000 – 00_FFFF which contains (I suppose normal mode (exclude expanded mode)) only registers 00_0000_00_07FF
Hmmm, I think we slipped to BDM command and functionality. If you are not BDM developer and you only some development IDE with defined structure of communication then it has no meaning to go deeper into it because each developer creates his own communication structure, command usage, background SW implementation,……
For example in the CodeWarrior Memory window of the debugger I can visualize the same space by-
- Setting PPAGE in the Register window to 0xFE and asking to visualize memory 0x8000’L in memory window.
- Or directly asking to visualize global memory 0x7F8000’G in memory window
How it is done on background…I do not know.
May I see schematic of your board...important for me is MCU environment?
What OS you use and what commercial interface is not working?
Do you have CW 5.1 and W7 available for tests?
Best regards,
Ladislav