This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5969 and writing above the address space 0xFFFF using MSP430X

Other Parts Discussed in Thread: MSP430FR5969

Hi everyone,


I'm using CCSv6 and trying to access registers on the MSP430FR5969 that range from 0xFFFFF-0x10000 to extend the available memory from 64kB to 1MB.

I currently have read access to the entire address range 0xFFFFF-0x00, using the command:

asm(" mova &0F0000h,R7");  //retrieve the value from upper 1MB range, 0xF0000

but I cannot write to this address, using:

asm(" mova #0, &0F0000h"); //write zero to the address 0xF0000.

but writing to the lower 64kB range works:

asm(" mova #0, &0E000h"); //works in lower 64k, write value 0 into address 0x0E000

There seems to be no difference between using the mova and movx (.b/.w) commands and it seems like there must be a configuration setting that is granting me read only access.

How can I write to the address space above 0x10000?

Here are my flag settings:

-vmspx --abi=eabi --data_model=large --near_data=none --use_hw_mpy=F5 --include_path="/home/gunnar/ti/ccsv6/ccs_base/msp430/include" --include_path="/home/gunnar/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.5/include" --advice:power="all" --advice:hw_config="1" -g --define=__MSP430FR5969__ --define=__MSP430X__ --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --large_memory_model --printf_support=minimal

  • Gunnar,

    Gunnar Pope said:
    asm(" mova #0, &0F0000h"); //write zero to the address 0xF0000.

    First, writing to 0xF0000 is out of the MSP430FR5969 memory range.

    Also, you don't need to use asm() to accomplish this. You could let the compiler to automatically write data to the upper memory.

    1. You could use #pragma location() to place variables in the upper memory.

    2. You could write something like this

        unsigned int data;
        unsigned int *ptr = 0;

        ptr = (unsigned int *)0x13000;

        *ptr = data;

    3. MPU is enabled by default within CCSv6 which may prevent your application to write to certain memory segments that are protected against writes. You would need to either reconfigure it or disable this MPU by going to your Project Properties -> General -> MSP430 MPU -> uncheck Enable Memory Protection Unit (MPU)

    Regards,

    William

  • Thanks for the input!

    "First, writing to 0xF0000 is out of the MSP430FR5969 memory range."

    But isn't the MSP430FR5969 an MSP430X device, which can access up to 1MB address range?

    In the device specific datasheet for the FR5969, (slau367G p101) "The MSP430X CPU can address a 1MB address range without paging." Which would imply that you can address up to 0xFFFFF with a 20-bit address

    I noticed that the MPU is organized to protect regions from 0x4400-0x13FFF, and I can read/write to all of this address space. But I can't write above 0x13FFF - no matter if the MPU is enabled or disabled. Why is this?


    Do I need to compile with gcc instead of the TI compiler to access this upper space?

    The attempts below did not modify the value at address 0x13000.

    #pragma location=0x13000;
        uint8_t  y = 10;

        #pragma location=(z, 0xE008);
        uint8_t  z = 10;

    But your method in 2 worked out just fine. :)

  • Gunnar Pope said:
    I noticed that the MPU is organized to protect regions from 0x4400-0x13FFF, and I can read/write to all of this address space. But I can't write above 0x13FFF - no matter if the MPU is enabled or disabled. Why is this?

    Because the MSP540FR5969 does not have any memory above 0x13FFF.

        -- Anders Lindgren

**Attention** This is a public forum