??? 06/12/07 12:07 Read: times |
#140581 - one example Responding to: ???'s previous message |
Richard Erlacher said:
Modern variants on this architecture sometimes, in some cases, violate these general rules. I don't think they actually violate these rules? What they do is to provide cunning schemes whereby the physical memory can be re-mapped to the CODE address space (where it can be executed) or to a data address space (where it can be read & written)... The SILabs f12x has some SFR bits that makes a movx @dptr,a write to code space. an example of what is involved dempnstrating that it is not just 'do it': void WriteFlash (U8 xdata * WFSaddr, U8 WFCdata) { U8 WFCintsav; WFCintsav = SG_IE; SG_IE = 0; SG_SFRPAGE = 0x0f; SF_CCH0CN &= 0xfe; // single byte write SG_SFRPAGE = 0; if (WFSaddr > 0x7fff) { SG_PSBANK = 0x31; } else { SG_PSBANK = 0x21; WFSaddr += 0x8000 ; } S0_FLSCL |= 0x01 ; // flash write S0_PSCTL |= 0x01 ; // movx to flash *WFSaddr = WFCdata ; //write the byte S0_PSCTL &= 0xfe ; // restore S0_FLSCL &= 0xfe ; // restore SG_PSBANK = 0x11 ; SG_IE = WFCintsav; }Erik |
Topic | Author | Date |
8051 ram space | 01/01/70 00:00 | |
Yes | 01/01/70 00:00 | |
Summary | 01/01/70 00:00 | |
one example | 01/01/70 00:00 | |
Yes, some of them do that ... | 01/01/70 00:00 | |
DMA to internal XRAM? | 01/01/70 00:00 | |
I know that ... but it would be convenient ...![]() | 01/01/70 00:00 |