This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

external flash memory ranges

I am writing the flash programmer. Flash memory 128K connected to uP via CS0. Did somebody know which address ranges flash occupyes in memory space of uP?

Parents
  • what byte of flash i'll get - number 32768 or 65536(numeration from 0)?

    Check the user manual for the C16x for the exact memory map; it's not the whole first segment that gets "cut out", only certain area's. If I recall correctly, SFR's, IRAM (and XRAM) are checked first, then CS1 and CS3, then CS2 and CS4. If the address doesn't fall in these ranges, CS0 is used. Of course this depends on how many CS's you're using.

    Hmm, I'm interested in what happens when you disable CS0 (BUSCON0.act = 0) and an address doesn't fall in the CS1-4 ranges...

    About the addresses: the address doesn't change, only the chip select. So, the same address is put on the address lines -> 0x01'0000 is read from flash.

    As you can see, some memory area's in flash can not be accessed because of the SFR, etc. area's. You could create a second memory range and also connect it to the flash chipselect. That way the whole flash area is accessible, but using a different address range.

    Regards,
    Joost Leeuwesteijn

Reply
  • what byte of flash i'll get - number 32768 or 65536(numeration from 0)?

    Check the user manual for the C16x for the exact memory map; it's not the whole first segment that gets "cut out", only certain area's. If I recall correctly, SFR's, IRAM (and XRAM) are checked first, then CS1 and CS3, then CS2 and CS4. If the address doesn't fall in these ranges, CS0 is used. Of course this depends on how many CS's you're using.

    Hmm, I'm interested in what happens when you disable CS0 (BUSCON0.act = 0) and an address doesn't fall in the CS1-4 ranges...

    About the addresses: the address doesn't change, only the chip select. So, the same address is put on the address lines -> 0x01'0000 is read from flash.

    As you can see, some memory area's in flash can not be accessed because of the SFR, etc. area's. You could create a second memory range and also connect it to the flash chipselect. That way the whole flash area is accessible, but using a different address range.

    Regards,
    Joost Leeuwesteijn

Children