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.

CCS/MSP430FR5043: Device hangs during initialization

Part Number: MSP430FR5043
Other Parts Discussed in Thread: MSP430FR6043, MSP-TS430PM64F

Tool/software: Code Composer Studio

Hi,

I have a custom MSP430FR5043 board, and I'm trying to include uss software library to my project. The default setting of data memory model size is "restricted", and it seems like uss library requires large data memory model. 

After changing the setting, my project can be built normally. But when I try to run my project, the program hangs when calling "__TI_zero_init_template" in "copy_zero_init.c ".

Is there any template uss project for msp430fr5043? Or did I do anything wrong with the memory setting?

  • The Usual Suspect for this symptom is that your data/bss space has grown too big to initialize before the watchdog goes off. The way to check this is to set a breakpoint at the (reset) entry point C_int00. (I usually just do a "Hard Reset" using the "chip" button up at the top, so I don't have to remember the symbol name.)

    If this is what's wrong, you can define "int _system_pre_init(void){WDTCTL = WDTPW + WDTHOLD;return(1);}"

  • Hi Bruce,

    Thank you for reply.

    I've tried your solution but it still hangs. I've tested my board with two different projects, one is based on the template uss 6043 project, the other one is based on a empty project and I included the USS library on my own. Both projects hang in the same place. But one time I accidently switched the linker command file from lnk_msp430fr5043.cmd to lnk_msp430fr6043.cmd and the program didn't hang. Is there any known issue with memory allocation on msp430fr5043?

  • Are you reset-ing repeatedly, or just never returning from C initialization? If you pause the debugger, what code is executing?

    I don't have either of those devices, though I don't suppose there's a problem with the memory per se. [Maybe someone else here does?]

  • Hi 

    My board is not reset-ing repeatedly, it didn't return from initialization.

    The program stuck in a loop  "      while(count--) WRITE8_ADV(outbuf, 0);" in function " void __TI_zero_init_template(pointer_to_const_t inbuf, pointer_t outbuf,

    int USE_MEMSET)".

  • Hi,

    If you are looking for using our USS library with MSP430FR5043. Please refer to this file. MSP430FR5043_SW_Changes.zip

    Best regards,

    Cash Hao

  • Hi,

    Thank you for reply. I've applied the changes mentioned in the file you provided, and my project can pass the initialization now. But now it hangs in another loop.

    It hangs while executing "void commonWaitForconversion(USS_capture_power_mode_option mode) ". 

    It hangs in this loop

    while(false ==
    ((USSSWLIB_USS_interrupt_status & USS_SAPH_SEQ_ACQ_DN_INTERRUPT) ||
    (USSSWLIB_USS_interrupt_status & USS_SDHS_ACQDONE_INTERRUPT) ||
    (USSSWLIB_USS_interrupt_status & USS_SAPH_SEQUENCE_STOPPED) ||
    (USSSWLIB_USS_interrupt_status & USS_UUPS_STOPPED_BY_DEBUGGER) ||
    (USSSWLIB_USS_interrupt_status & USS_HSPLL_PLL_UNLOCK_INTERRUPT) ||
    (USSSWLIB_USS_interrupt_status & USS_UUPS_PWR_UP_TM_OUT_INTERRUPT)))
    {
    if(USS_capture_power_mode_active != mode)
    {
    __bis_SR_register(mode);
    __disable_interrupt();
    }else
    {
    __enable_interrupt();
    }
    }

    But my MSP430FR6043 can run flawlessly with the same code. Is there any differences in the interrupt setting between FR5043 and FR6043?

  • Hi,

    There should be no differences in the interrupt setting between FR5043 and FR6043.

    I would recommend you to follow the file I sent before again. It should work with that instruction.

    Best regards,

    Cash Hao 

  • Hi Cash,

    I followed the file you sent to me. And it still hangs in the same loop. Comparing to my MSP430FR6043 project, it seems like my "USS_SAPH_SEQ_ACQ_DN_INTERRUPT" is never triggered in my MSP430FR5043 project. My project is currently running with default setting. Do you have any suggestions on which part of my setting should I check or modify?

    Best regards,

    CY H

  • Hi,

    Some things you can check on.

    1. Check the schematic, what you have changed for a FR5043 board.

    2. Check if you can still connect to the GUI with FR5043 board. If you can, what error code is showed on the GUI.

    Best regards,

    Cash Hao

  • Hi ,

    1. I would like to use a 64-pin target development board to test my external circuits separately. 

    But MPS430FR5043 is not listed in the supported product on the MSP-TS430PM64F page.

    Is there a target development board for FR5043?

    2. It seems like the images provided in the GUI package are for FR6047 and FR6043. Should I directly use the FR6043 image on my FR5043 custom board?

    Best regards,

    CY H

  • Hi,

    1. We do not have a target board for FR5043

    2. Open the GUI, click Options->Meter Options, Choose Custom board, MSP430FR5043, Gas.

    Best regards,

    Cash Hao

**Attention** This is a public forum