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.

Compiler/MSP430FR5994: Write to higher addresses 0x10000

Part Number: MSP430FR5994

Tool/software: TI C/C++ Compiler

Hi,

I am trying to upgrade the MSP430FR5994 firmware and while writing the Main APP image in the custom bootloader. Image writing is failed when address reaches 0x10000.

My function to write the binary into flash is ----

unsigned char write_image_to_flash(int32_t addr,uint8_t data)
{
uint8_t dummy_var;
dummy_var=*(uint8_t*)addr;

MPUCTL0 = MPUPW | MPUENA; // Enable access to MPU registers
MPUSAM |= MPUSEG2WE; // Enable Write access
*(uint8_t *) ((uint32_t)addr) = data; // Write the vector
MPUSAM &= ~MPUSEG2WE; // Disable Write access
MPUCTL0_H = 0x00; // Disable access to MPU registers

dummy_var=*(uint8_t*)addr;

return (dummy_var == data) ? Success : Failed;
// return RET_OK;

}

I have tested this function earlier, previously the image size was small and everything was working fine.(if address reamins under 0x10000)

**Attention** This is a public forum