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.

MSP430F6736A: User data write to Info Segments taking ~32 ms for 64-byte write

Part Number: MSP430F6736A


Tool/software:

Hi TI Team,

I am working with the MSP430F6736A and noticed something unusual regarding flash write performance. While writing to the Info A,B,C or Info D any individual memory segment, it is taking around 31 ms just to write 64 bytes. And, if I write only 2 bytes then it is taking 29 ms.

This seems quite large compared to the expected flash write timings. Could someone please help me understand whether:

  1. This duration is normal for Info memory writes, or

  2. There might be something wrong in my implementation/sequence?

Any guidance or references would be very helpful.



Thanks,
Rahul

  • It is a bit long for just writing but perfectly reasonable if you include an erase. You don't show your code so I can't comment on your implementation.

  • Hi David,

    Please find below the code -

    void user_flash_update(void) {
        uint32_t *addr_pri = (uint32_t*)FLASH_INFO_C_ADDR;
    
        uint16_t ui16GIE = __get_SR_register() & GIE;
        __bic_SR_register(GIE);
        __disable_interrupt();
    
        FCTL3 = FWKEY;
        FCTL1 = FWKEY | ERASE;
        *(uint8_t*)addr_pri = 0;
        FCTL1 = FWKEY | WRT;
    
        memcpy(addr_pri, &flashstr, sizeof(flashstr_t)); // 64 bytes
    
        FCTL1 = FWKEY;
        FCTL3 = FWKEY | LOCK;
    
        __bis_SR_register(ui16GIE);
    }

    Thanks,
    Rahul

  • Hi,

    The time includes erase process. It is normal to take about 30ms for an erase operation. 

    FCTL1 = FWKEY | ERASE;

    Best regards,

    Cash Hao

**Attention** This is a public forum