Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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/MSP432P401R: Not going to BSL

Part Number: MSP432P401R

Tool/software: Code Composer Studio

Hi,

i have a problem with MSP432 and BSL Invoke.

If i the Hardware BSL Invoke funktion call is right at begin of the program code everything works like this:

int main(void)
{
volatile uint32_t ii;

/* Halting the Watchdog */
MAP_WDT_A_holdTimer();

//Old Board with PUMP PWM on P6.6 and P6.7
MSP432_Clock_init();

// GPIO_setAsOutputPin(GPIO_PORT_P3, GPIO_PIN0);
// GPIO_setOutputLowOnPin(GPIO_PORT_P3, GPIO_PIN0);

if(CheckFlashMailbox(COMMAND_BSL_CONFIG) !=BOOT_OVERRIDE_AND_MAILBOX_OPERATIONS_SUCCESS)
{
// GPIO_setOutputHighOnPin(GPIO_PORT_P3, GPIO_PIN0);
if((P1->IN & BIT0)==1)
{
// SysCtl_rebootDevice();
BSL_INVOKE(BSL_CONFIG_HW_INVOKE_PORT1 | BSL_CONFIG_HW_INVOKE_PIN0 |
BSL_CONFIG_HW_INVOKE | BSL_CONFIG_HW_INVOKE_PIN_HIGH |
BSL_CONFIG_INTERFACE_UART);
}
}

If i call this function right after some initialisation it doesnt responde to BSL Scripter at all.

Why is it like this?

If i software BSL invoke like sending a UART command and  i call then this function:

BSL_INVOKE(BSL_CONFIG_HW_INVOKE_PORT1 | BSL_CONFIG_HW_INVOKE_PIN0 |
BSL_CONFIG_HW_INVOKE | BSL_CONFIG_HW_INVOKE_PIN_HIGH |
BSL_CONFIG_INTERFACE_UART);

It also doenst work.

Can anyone help me?

OBs: I am flashing the MSP432 througth BSL Scripter.

  • I am comparing what you are describing with the hardware and software invocations described in this document, . In order to configure the hw invocation you must use the JTAG mailbox system, then upon reset the bootloader takes the configuration found in the mailbox and applies it.  For the sw invocation it is important to clear and disable interrupts:

    jumpToBsl = false;
    MAP_Interrupt_disableMaster();
    NVIC->ICER[0] = 0xFFFF;
    NVIC->ICPR[0] = 0xFFFF;
    NVIC->ICER[1] = 0xFFFF;
    NVIC->ICPR[1] = 0xFFFF;
    ((void (*)())BSL_ENTRY_FUNCTION)((uint32_t)BSL_PARAM);

    Please let me know if this makes sense and perhaps clarify what you mean by HW invocation.

    Regards,

    Chris

  • Hi Chris,

    the hardware invocation is not working, only when the BSL_INVOKE Funktion is right at beginning.

    I am settings the GPIO HIGH and reseting the MSP432, it always gets in the BSL_INVOKE(...) function but then doesnt responds to the BSL Scripter UART commands.

    Now if i move the BSL_INVOKE(...) function right on beginning of main() function, it communicates with BSL Scripter.

    If i send a command via UART, the MSP432 set a flag to true and after it finish UART ISR, this flag let the MCU to call the BSL_INVOKE function in main. The BSL also doenst respond to the BSL Scripter.

    I have now downloaded the latest BSL Scripter and it dindt worked.

    The problem is that i have already this firmware in the field, and i am not able to update them.
    Is there anything i can try on BLS Scripter? Or why is the BSL not responding? Is BSL_ENTRY_FUNCTION and BSL_INVOKE the same function?
  • The BSL_INVOKE is just a macro defined in the device header file.

    /******************************************************************************
    * BSL                                                                         *
    ******************************************************************************/
    #define BSL_DEFAULT_PARAM                        ((uint32_t)0xFC48FFFF)          /*!< I2C slave address = 0x48, Interface selection = Auto */
    #define BSL_API_TABLE_ADDR                       ((uint32_t)0x00202000)          /*!< Address of BSL API table */
    #define BSL_ENTRY_FUNCTION                       (*((uint32_t *)BSL_API_TABLE_ADDR))
    
    #define BSL_AUTO_INTERFACE                       ((uint32_t)0x0000E0000)         /*!< Auto detect interface */
    #define BSL_UART_INTERFACE                       ((uint32_t)0x0000C0000)         /*!< UART interface */
    #define BSL_SPI_INTERFACE                        ((uint32_t)0x0000A0000)         /*!< SPI interface */
    #define BSL_I2C_INTERFACE                        ((uint32_t)0x000080000)         /*!< I2C interface */
    
    #define BSL_INVOKE(x)                            ((void (*)())BSL_ENTRY_FUNCTION)((uint32_t) x) /*!< Invoke the BSL with parameters */

    I was confused because I saw the settings for the port and pin which are not compatible with the entry function.  

    I will need to discuss with my colleague.  If the HW invocation has not been established with the JTAG mailbox and the SW invocation is not working because the interrupts were not disabled, then I do not believe the BSL scripter will be able to connect with the device.  You would need to introduce a JTAG connection to reprogram these devices in the field.  I assume that the JTAG is not accessible.

    Regards,

    Chris

  • Hi Chris,

    i know that this function BSL_ENTRY_FUNCTION() is getting called, i have set a GPIO to signalize that it will enter the function after hard reset.

    I think i misunderstood HW and SW invoke BSL methods. SW invoke is the one that calls BSL_ENTRY_FUNCTION right?

    To make a HW BSL Invoke a GPIO Port is needed to be set and after reset the Bootloader will check if if this GPIO is HIGH or LOW depending on the settings. If HIGH in my case it wont boot the main code but goes directly to BSL and waits for the command of BSL Scripter for example right?
  • Hi,

    so i succesfully did a hardware BSL on the MSP432 by overwriting the flashmailbox parameters.

    Hardware overwritting is not really what i want. I think Software BSL invoke is better, since i dont need to wire external PIN.

    Problem is that it doenst work if thr BSL_INVOKE is not at beginning of main().

    I want to send an UART command to MSP which will call the BSL_INVOKE function:

                    case BSLSOFTWARE:
                                            MAP_Interrupt_disableMaster();
                                            NVIC->ICER[0] = 0xFFFF;
                                            NVIC->ICPR[0] = 0xFFFF;
                                            NVIC->ICER[1] = 0xFFFF;
                                            NVIC->ICPR[1] = 0xFFFF;
                                            BSL_INVOKE(BSL_CONFIG_INTERFACE_UART);
                                            break;


    But this doenst work. Why?

    Edit: Changing the code to this one doenst work either. Only if i put it right on beginning of main.

                                            MAP_Interrupt_disableMaster();
                                            NVIC->ICER[0] = 0xFFFF;
                                            NVIC->ICPR[0] = 0xFFFF;
                                            NVIC->ICER[1] = 0xFFFF;
                                            NVIC->ICPR[1] = 0xFFFF;
                                            BSL_INVOKE(0xFC48FFFF);//BSL_CONFIG_INTERFACE_UART);

  • Hi Michael,

    If you want to use the hardware invocation, there is no handling needed inside your code.

    The steps would be:

    1. Writing in the Flash mailbox parameters

    2. Reset the device so the bootcode will execute the parameters inside the flash mailbox

    3. Every time you would like to enter the BSL, apply the polarity you setup at step (1), then reset the device.

    you can refer to section 2.3 in http://www.ti.com/lit/ug/slau690e/slau690e.pdf

    For the software invocation, section 3.3.1 in http://www.ti.com/lit/ug/slau622g/slau622g.pdf describes the example code.

    Let me know if you are successfully run the example described in SLAU622 on your side.

  • Hi Fatmawati,

    yes you right. Hardware invokation is working now. Software invokation doenst work. 

    The function gets called but it doesnt respond to BSL Scripter. 

    I have implemented the same code as in the section 3.3.1 from slau622g.pdf

    I am not handling it inside an ISR but in main. 

    A UART message will enable a flag that in main will call the BSL Invoke function.

    Any reasons that SW is not working?

    The only way getting SW BSL to work, is when i move the code right at beginning of main().

    I set a GPIO PIN HIGH, reset the device, when GPIO is high -> my BSL Invoke function gets called in main and it will respond to BSL Scripter.

    Hardware invoke is here disable.

      

  • Hi Michael,
    how do you implement the BSL_INVOKE?
    Does it refer to the BSL entry point 0x202000?
    If you try as the example describe, will it work?

    #define BSL_PARAM 0xFC48FFFF // I2C slave address = 0x48, Interface selection = Auto
    #define BSL_API_TABLE_ADDR 0x00202000 // Address of BSL API table
    #define BSL_ENTRY_FUNCTION (*((uint32_t *)BSL_API_TABLE_ADDR))
    ((void (*)())BSL_ENTRY_FUNCTION)((uint32_t)BSL_PARAM); // Call the BSL with given BSL parameters

    void main (void)
    {
    // Stop watchdog
    MAP_WDT_A_holdTimer();

    MAP_Interrupt_disableMaster();
    NVIC->ICER[0] = 0xFFFF;
    NVIC->ICPR[0] = 0xFFFF;
    NVIC->ICER[1] = 0xFFFF;
    NVIC->ICPR[1] = 0xFFFF;
    ((void (*)())BSL_ENTRY_FUNCTION)((uint32_t)BSL_PARAM);
    }
  • Hi Fatmawati,

    yes this example works.

    But this one doesnt:

    int main(void)
    {
        volatile uint32_t ii;
    
        /* Halting the Watchdog */
        MAP_WDT_A_holdTimer();
    
        MSP432_Clock_init();
    
        if((P1->IN & BIT0)==1)
        {
            MAP_Interrupt_disableMaster();
            NVIC->ICER[0] = 0xFFFF;
            NVIC->ICPR[0] = 0xFFFF;
            NVIC->ICER[1] = 0xFFFF;
            NVIC->ICPR[1] = 0xFFFF;
            BSL_INVOKE(0xFC48FFFF);//BSL_CONFIG_INTERFACE_UART);<----------------------------------This works
        }
    
        GPIO_setAsInputPinWithPullDownResistor(GPIO_PORT_P4, GPIO_PIN4);//Configuration
        GPIO_setAsInputPinWithPullDownResistor(GPIO_PORT_P4, GPIO_PIN5);//Configuration
        GPIO_setAsInputPinWithPullDownResistor(GPIO_PORT_P4, GPIO_PIN6);//Configuration
        GPIO_setAsInputPinWithPullDownResistor(GPIO_PORT_P4, GPIO_PIN7);//Configuration
    
        if(GPIO_getInputPinValue(GPIO_PORT_P4, GPIO_PIN4) == GPIO_INPUT_PIN_HIGH &&
           GPIO_getInputPinValue(GPIO_PORT_P4, GPIO_PIN4) == GPIO_INPUT_PIN_HIGH &&
           GPIO_getInputPinValue(GPIO_PORT_P4, GPIO_PIN4) == GPIO_INPUT_PIN_HIGH &&
           GPIO_getInputPinValue(GPIO_PORT_P4, GPIO_PIN4) == GPIO_INPUT_PIN_HIGH)
        {
            //New Board with PUMP PWM change to P5.6 and P5.7
            pwmConfigPumpe1.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
            pwmConfigPumpe2.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
            init_Pumpe(Pumpe_Port_New);
    
            MAP_GPIO_setAsInputPin(GPIO_PORT_P6, GPIO_PIN6);//Set Over Current Interrupt PORT 3
            MAP_GPIO_clearInterruptFlag(GPIO_PORT_P6, GPIO_PIN6);
            MAP_GPIO_enableInterrupt(GPIO_PORT_P6, GPIO_PIN6);
            MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P6, GPIO_PIN6,GPIO_HIGH_TO_LOW_TRANSITION);
    
            boardConfiguration=0xFF;
        }
        else
        {
            //Old Board with PUMP PWM on P6.6 and P6.7
            pwmConfigPumpe1.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_3;
            pwmConfigPumpe2.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_4;
            init_Pumpe(Pumpe_Port);
    
            MAP_GPIO_setAsInputPin(GPIO_PORT_P5, GPIO_PIN6);//Set Over Current Interrupt PORT 3
            MAP_GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN6);
            MAP_GPIO_enableInterrupt(GPIO_PORT_P5, GPIO_PIN6);
            MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P5, GPIO_PIN6,GPIO_HIGH_TO_LOW_TRANSITION);
    
            boardConfiguration=0x00;
        }
    
    
    
        turn_Pump_OFF(Pump_1);
        turn_Pump_OFF(Pump_2);
    
        init_Ventil_PWM();
        init_Ventil();
        open_all_ventil();
    
    
        UART_init();
    
    
        //Power PORT set PIN Enable
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P8, GPIO_PIN4);
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P8, GPIO_PIN5);
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P8, GPIO_PIN6);
    
    
        MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P8, GPIO_PIN4);//Power OFF
        MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P8, GPIO_PIN5);//Power OFF
        MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P8, GPIO_PIN6);//Power OFF
    
    
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P3, GPIO_PIN2);
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN3);
    
        //Power PORT set INT
        MAP_GPIO_setAsInputPin(GPIO_PORT_P5, GPIO_PIN4);//Set Over Current Interrupt PORT 1
        MAP_GPIO_setAsInputPin(GPIO_PORT_P5, GPIO_PIN5);//Set Over Current Interrupt PORT 2
    
        MAP_GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN4);
        MAP_GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN5);
    
        MAP_GPIO_enableInterrupt(GPIO_PORT_P5, GPIO_PIN4);
        MAP_GPIO_enableInterrupt(GPIO_PORT_P5, GPIO_PIN5);
    
        MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P5, GPIO_PIN4,GPIO_HIGH_TO_LOW_TRANSITION);
        MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P5, GPIO_PIN5,GPIO_HIGH_TO_LOW_TRANSITION);
    
        MAP_Interrupt_enableInterrupt(INT_PORT5);
    
        Init_I2C_GPIO_1();
        Init_I2C_GPIO_2();
        Init_I2C_GPIO_3();
    
        I2C_init_1();
        I2C_init_2();
        I2C_init_3();
    
        MS5525DSO_SPI_INIT();
        set_all_CS_High();
        MS5525DSO_Setup_Sensor(1);//init Pressure Sensor 1
        MS5525DSO_Setup_Sensor(2);//init Pressure Sensor 2
        MS5525DSO_Setup_Sensor(3);//init Pressure Sensor 3
        MS5525DSO_Setup_Sensor(4);//init Pressure Sensor 4
        MS5525DSO_Setup_Sensor(5);//init Pressure Sensor 5
        MS5525DSO_Setup_Sensor(6);//init Pressure Sensor 6
        MS5525DSO_Setup_Sensor(7);//init Pressure Sensor 7
    
    
         /*Initialize TMP006 temperature sensor */
        //MLX90615_init();
        //LIS2H_Init(2, LIS2H_I2C_ADD);//Init Accelerometer
    
         /* Configuring GPIO2.4 as peripheral output for PWM for ADPD105 */
        MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN4,GPIO_PRIMARY_MODULE_FUNCTION);
        //MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN5,GPIO_PRIMARY_MODULE_FUNCTION);
        //MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN6,GPIO_PRIMARY_MODULE_FUNCTION);
        //MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN7,GPIO_PRIMARY_MODULE_FUNCTION);
    
    
    
        EXTREMITIES = 0;
        Flag_CIS_OHR=0;
        Zustand=0;
        MAP_Interrupt_enableMaster();
    
         MAP_SysCtl_setWDTTimeoutResetType(SYSCTL_SOFT_RESET);
         MAP_WDT_A_initWatchdogTimer(WDT_A_CLOCKSOURCE_SMCLK, WDT_A_CLOCKDIVIDER_128M);
         // Setting our SysTick to wake up every 128000 clock iterations to service the dog.
         MAP_SysTick_enableModule();
         MAP_SysTick_setPeriod(48000000);
         MAP_SysTick_enableInterrupt();
         MAP_WDT_A_startTimer();
    
    
    
        while(1)
        {
    
            MAP_WDT_A_clearTimer();
    
            if(UART_COMMAND)
            {
                UART_COMMAND=0;
    
                switch(VALUE)
                {
                    case BSLSOFTWARE:
                                            VALUE=0;
                                            MAP_Interrupt_disableMaster();
                                            NVIC->ICER[0] = 0xFFFF;
                                            NVIC->ICPR[0] = 0xFFFF;
                                            NVIC->ICER[1] = 0xFFFF;
                                            NVIC->ICPR[1] = 0xFFFF;
                                            BSL_INVOKE(0xFC48FFFF);//BSL_CONFIG_INTERFACE_UART);<---------------This doesnt work
                                            break;

  • Hi Fatmawati,

    any idea why it is not working inside a "switch case"?
    You see on the code i have two positions of BSL_INVOKE. One at line 17 which works and one at line 163 which doesnt.

    Do i have to disable anything else before i call this function?
  • HI Michael,

    I haven't found exact idea which it does not work.

    I suggest some tests:

    1)if you place the code from line 157 to 149, does it work?

    2)make sure the software really goes to case BSLSOFTWARE with the breakpoint

    3) I don't think this 3rd thing is the case: the BSL goes to sleep mode after 10 seconds. so once it is invoked, make sure you run the BSL Scripter in 10 seconds.

    4) Other thing: I looked into BSL source code, the SysTick is actually used by the BSL, to detect the sync bytes when starting UART BSL. could you please try to comment lines 138-141. I suspect some modules which are used on your application code, used by the BSL, but they are not properly configured in the BSL code. We provide the source code which could be your reference under http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPBSL_CustomBSL432/latest/index_FDS.html

  • Hi Fatmawati,

    1)It doesnt work.
    2)software is going to BSLSOFTWARE and calling BSL_INVOKE.(Breakpoint)
    3)I have set a 10s delay between UPDATE UART command and the BSL Scripter process. Didnt work.
    4) Maybe here i can undo all initialisation before calling BSL_INVOKE function. But how do i undo GPIO/TIMER/UART Init?
  • Hi Fatmawati,

    so i tryied to disable everything i could but it didnt worked:

     case BSLSOFTWARE:
                                            Zustand=0;
                                            WDT_A_holdTimer();
                                            SysTick_disableInterrupt();
                                            SysTick_disableModule();
    
                                            GPIO_clearInterruptFlag(GPIO_PORT_P2, GPIO_PIN5);
                                            //GPIO_disableInterrupt(INT_PORT2,GPIO_PIN5);<-------Disable Interrupt doesnt worked, the CPU jumps off switch case
    
                                            GPIO_clearInterruptFlag(GPIO_PORT_P4, GPIO_PIN1);
                                            GPIO_clearInterruptFlag(GPIO_PORT_P4, GPIO_PIN2);
                                            GPIO_clearInterruptFlag(GPIO_PORT_P4, GPIO_PIN3);
                                          //  GPIO_disableInterrupt(INT_PORT4,GPIO_PIN1);
                                          //  GPIO_disableInterrupt(INT_PORT4,GPIO_PIN2);
                                          //  GPIO_disableInterrupt(INT_PORT4,GPIO_PIN3);
    
                                            GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN1);
                                            GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN2);
                                            GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN3);
                                            GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN4);
                                            GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN5);
                                            GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN6);
                                          //  GPIO_disableInterrupt(INT_PORT5,GPIO_PIN1);
                                          //  GPIO_disableInterrupt(INT_PORT5,GPIO_PIN2);
                                          //  GPIO_disableInterrupt(INT_PORT5,GPIO_PIN3);
                                          //  GPIO_disableInterrupt(INT_PORT5,GPIO_PIN14);
                                          //  GPIO_disableInterrupt(INT_PORT5,GPIO_PIN5);
                                          //  GPIO_disableInterrupt(INT_PORT5,GPIO_PIN6);
    
                                            GPIO_clearInterruptFlag(GPIO_PORT_P6, GPIO_PIN6);
                                          //  GPIO_disableInterrupt(INT_PORT6,GPIO_PIN6);
    
                                           // Interrupt_disableInterrupt(INT_T32_INT1);
                                            //Interrupt_disableInterrupt(TIMER32_BASE);
    
                                            UART_disableModule(EUSCI_A0_BASE);
                                            UART_disableInterrupt(EUSCI_A0_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT);
                                            Interrupt_disableInterrupt(INT_EUSCIA0);
    
                                            DMA_disableInterrupt(INT_DMA_INT0);
                                            DMA_disableInterrupt(INT_DMA_INT1);
                                            DMA_disableInterrupt(INT_DMA_INT2);
                                            DMA_disableInterrupt(INT_DMA_INT3);
                                            DMA_disableInterrupt(INT_DMA_ERR);
                                            DMA_disableChannel(DMA_CHANNEL_0);
                                            DMA_disableChannel(DMA_CHANNEL_1);
                                            DMA_disableChannel(DMA_CHANNEL_2);
                                            DMA_disableChannel(DMA_CHANNEL_3);
                                            DMA_disableChannel(DMA_CHANNEL_4);
                                            DMA_disableChannel(DMA_CHANNEL_5);
                                            DMA_disableChannel(DMA_CHANNEL_6);
                                            DMA_disableChannel(DMA_CHANNEL_7);
    
                                            Interrupt_disableMaster();
                                            NVIC->ICER[0] = 0xFFFF;
                                            NVIC->ICPR[0] = 0xFFFF;
                                            NVIC->ICER[1] = 0xFFFF;
                                            NVIC->ICPR[1] = 0xFFFF;
                                            BSL_INVOKE(0xFC48FFFF);//BSL_CONFIG_INTERFACE_UART);
    

  • Michael,
    Did you also try clearing the flags associated with the UART IFGs (UCTXIFG and UCRXIFG)? I see this for the gpio but not the UART.

    Regards,
    Chris
  • Hi Chris,

    how can i clear the flasg from  UART IFGs (UCTXIFG and UCRXIFG)?

    The Hardware BSL Invoke is working but i cannot get software invoke to work if the programm code starts.

    Only if it is at beginning from code.

    Is there a way on MSP432 to software reset the device so it start on main() again?

    And if so, a way to use a flash or a variable to notify a flag and i will check this variable everytime if a software invocation is desired?

  • A description of the driverLib API for clearing the UART flags can be found here:

    dev.ti.com/.../group__uart__api.html

    For the software reset I would recommend looking into using a soft reset as described in the TRM.

    The driverlib APIs available are as follows:

    void ResetCtl_initiateSoftReset(void)
    {
        RSTCTL->RESET_REQ |= (RESET_KEY | RESET_SOFT_RESET);
    }
    
    void ResetCtl_initiateSoftResetWithSource(uint32_t source)
    {
        RSTCTL->SOFTRESET_SET |= (source);
    }
    
    uint32_t ResetCtl_getSoftResetSource(void)
    {
        return RSTCTL->SOFTRESET_STAT;
    }
    
    void ResetCtl_clearSoftResetSource(uint32_t mask)
    {
        RSTCTL->SOFTRESET_CLR |= mask;
    }
    

    Regards,

    Chris

  • Hi Chris,

    thanks you for your API.

    So if i software reset the MSP432, how would i enter this function?

    int main(void)
    {
        /* Halting the Watchdog */
        MAP_WDT_A_holdTimer();
    
        if(????) <------------- What should i ask here?
        {
            MAP_Interrupt_disableMaster();
            NVIC->ICER[0] = 0xFFFF;
            NVIC->ICPR[0] = 0xFFFF;
            NVIC->ICER[1] = 0xFFFF;
            NVIC->ICPR[1] = 0xFFFF;
            BSL_INVOKE(0xFC48FFFF);
        }
    

    I will have to store a flag somewhere that the software reset doenst clear and ask at the if condition if this flag is set right?

    How can i do that on MSP432?

  • You are correct.  Since the software reset (class 3) does not impact the SRAM contents, you could use a global variable or flag to indicate that the BSL invocation is desired.  Alternatively, you could utilize the source/status registers in the reset controller to set/check if the BSL invocation was activated.  I chose bit location 3 since 0 through 2 are defined (0 -CPU Lockup, 1 - WDT timeout, 2 - WDT password).

    MAP_ResetCtl_initiateSoftResetWithSource(BIT3);
    
    
    int main(void)
    {
    ...
    
    if(MAP_ResetCtl_getSoftResetSource() & BIT3)
    {
        //perform BSL 
    }

  • Hi Chris,

    i try the software reset and it worked but BSL MSP432 didnt respond to BSL scripter(PC).
    It works if it is a hardware reset.

    Is there a software reset that is equal a hardware reset? It should reset the whole program.

    The BSL program on MSP432 conflicts with my program code, we are using the same peripheral/interrupt maybe and thats way it is not working.
    So i think reseting everything will be better. Once teh code starts i can ask if the flag is set.
  • There is a specific hard reset API, dev.ti.com/.../group__reset__api.html
    .
    Similarly, it can be done with and without the source information.

    Regards,
    Chris
  • Hi Chris,

    i change to hard reset like this:

     if(ResetCtl_getHardResetSource() & BIT3)
        {
            MAP_Interrupt_disableMaster();
            NVIC->ICER[0] = 0xFFFF;
            NVIC->ICPR[0] = 0xFFFF;
            NVIC->ICER[1] = 0xFFFF;
            NVIC->ICPR[1] = 0xFFFF;
            BSL_INVOKE(0xFC48FFFF);//BSL_CONFIG_INTERFACE_UART);
        }
    
    case BSLSOFTWARE:
                                            WDT_A_holdTimer();
                                            ResetCtl_initiateHardResetWithSource(BIT3);

    i am getting this issues from BSL Scripter:

    "\u001B[97m---------------------------------------------------------\nBSL Scripter 3.4.0.1\n\nPC software for BSL programming\n2018-Jul-09 14:38:24\n---------------------------------------------------------\nInput file script is : /home/devel/MSP432/SourceCode/MSP432/script_MSP432_uart.txt\n\n\u001B[97m//\r\n\u001B[97m//Script example MSP432 UART BSL\r\n\u001B[97m//Device : MSP432P401R\r\n\u001B[97m//Download vasoport application to\r\n\u001B[97m//MSP432 device through UART BSL\r\n\u001B[97m//\r\n\u001B[97m//LOG\r\n\u001B[97mMODE P4xx UART 9600 /dev/ttymxc3 PARITY \r\n\tInitialization of P4xx BSL succeed!\n\u001B[97mCHANGE_BAUD_RATE 115200\r\n\u001B[97mRX_PASSWORD_32 pass256_wrong.txt\r\n\u001B[97m\tRead Txt File  : /home/devel/MSP432/SourceCode/MSP432/pass256_wrong.txt\n\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[97mRX_PASSWORD_32 pass256_default.txt\r\n\u001B[97m\tRead Txt File  : /home/devel/MSP432/SourceCode/MSP432/pass256_default.txt\n\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[97mMASS_ERASE\r\n\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[97mRX_DATA_BLOCK_32 vasoport.txt\r\n\u001B[97m\tRead Txt File  : /home/devel/MSP432/SourceCode/MSP432/vasoport.txt\n\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;

    31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[1;32m\tTime elapsed of writing 81444 bytes : 321.5 seconds\n\u001B[97m\u001B[1;32m\tSpeed of writing data :0.2474(kB/s)\n\u001B[97m\u001B[97mTX_BSL_VERSION_32\r\n\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[97mTX_DATA_BLOCK_32 0x0000 0x4000 ReadBlock_MSP432P401R.txt\r\n\u001B[97m\tWrite Txt File : /home/devel/MSP432/SourceCode/MSP432/ReadBlock_MSP432P401R.txt\n\u001B[0;31m\t[ACK_ERROR_MESSAGE]Unknown ACK value!\n\u001B[97m\u001B[1;32m\tTime elapsed of reading 0 bytes : 1.001 seconds\n\u001B[97m\u001B[1;32m\tSpeed of reading data : 0(kB/s)\n\u001B[97m\u001B[97mREBOOT_RESET\r\n\u001B[97m\n"

    Edit: If i hard reset the CPU from PC by pulling reset wire down, set GPIO as input for flag, once it reset and reboot it "ask" the GPIO if it set and enters the BSL Invoke function. And here the MCU update works.

  • Michael,

       Sorry that was an oversight on my part.  The Hard Reset Sources are different from the soft.  Specifically, source 3 is defined as a flash control reset.  

    Chris

  • Hi Chris,
    so which one should i use to set as a flag?
  • I would assume that any of the reserved flags are available, but I do not know. I will need to do some testing on my side. I do not completely understand why artificially setting the flash control reset source would have a negative impact on the operation of the BSL, this is not my expectation.

    Regards,
    Chris
  • Hi Chris,
    so real hardware reset(pulling reset PIN low) is the same as ResetCtl_initiateHardResetWithSource(...)?
    The only difference is that once can set a flag to say why it occurs right?
  • Yes. They are equivalent.

    Chris
  • Hey Michael, 

    I will have to confirm with some colleagues but I think the SysTick might be causing the issue. Can you try taking the SysTick out and see if that helps resolve the issue? 

  • Michael,
    Have you had any success with the HardReset or disabling the Systick/

    Thanks,
    Chris
  • Hi Chris, Hi Yu-Liu,

    if i uncomment SysTick  it still doenst work.

    if i software reset it, it doenst work.

    if i software hardware reset it, it doenst work.

    If i hardware reset it by toogling reset pin, it works.

    I didnt had time today but i will check tomorrow. 

    Hardware Invoke BSL via flashmailbox works great but i wish to get it with software invoke to wor, since i only need 2 wires if i use UART.

  • Michael,

       I have taken the code that you provided and the example that Yu was working on and I can see the BSL fail when the Systick is operational and the BSL work when the Systick is disabled before calling the BSL software invocation.  Please find the attached code.  Several functions have been commented out because we do not have the complete context of your code.

       Can you help us identify what pieces are missing?  Logically, it makes sense that any exception that is still enabled and occurs after the BSL has relocated the interrupt vector table will result in the CPU jumping to the wrong location.

    testBsl.c
    /*
     * Test code to determine error/relationship between Systick and BSL
     *
     */
    #include <stdio.h>
    
    #include <ti/devices/msp432p4xx/driverlib/driverlib.h>
    
    #define    SYSTICK_TIMEOUT  20
    
    uint16_t tickCounter;
    
    void SysTick_Handler(void)
    {
        MAP_WDT_A_clearTimer();
        MAP_GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0);
        tickCounter++;
    }
    
    int main(void)
    {
        volatile uint32_t ii;
    
        /* Halting the Watchdog */
        MAP_WDT_A_holdTimer();
        tickCounter = 0;
    
      //  MSP432_Clock_init();
    
        if((P1->IN & BIT0)==1)
        {
            MAP_Interrupt_disableMaster();
            NVIC->ICER[0] = 0xFFFF;
            NVIC->ICPR[0] = 0xFFFF;
            NVIC->ICER[1] = 0xFFFF;
            NVIC->ICPR[1] = 0xFFFF;
            BSL_INVOKE(0xFC48FFFF);//BSL_CONFIG_INTERFACE_UART);<----------------------------------This works
        }
    
        GPIO_setAsInputPinWithPullDownResistor(GPIO_PORT_P4, GPIO_PIN4);//Configuration
        GPIO_setAsInputPinWithPullDownResistor(GPIO_PORT_P4, GPIO_PIN5);//Configuration
        GPIO_setAsInputPinWithPullDownResistor(GPIO_PORT_P4, GPIO_PIN6);//Configuration
        GPIO_setAsInputPinWithPullDownResistor(GPIO_PORT_P4, GPIO_PIN7);//Configuration
    
        if(GPIO_getInputPinValue(GPIO_PORT_P4, GPIO_PIN4) == GPIO_INPUT_PIN_HIGH &&
           GPIO_getInputPinValue(GPIO_PORT_P4, GPIO_PIN4) == GPIO_INPUT_PIN_HIGH &&
           GPIO_getInputPinValue(GPIO_PORT_P4, GPIO_PIN4) == GPIO_INPUT_PIN_HIGH &&
           GPIO_getInputPinValue(GPIO_PORT_P4, GPIO_PIN4) == GPIO_INPUT_PIN_HIGH)
        {
            //New Board with PUMP PWM change to P5.6 and P5.7
    //        pwmConfigPumpe1.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
    //        pwmConfigPumpe2.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
         //   init_Pumpe(Pumpe_Port_New);
    
            MAP_GPIO_setAsInputPin(GPIO_PORT_P6, GPIO_PIN6);//Set Over Current Interrupt PORT 3
            MAP_GPIO_clearInterruptFlag(GPIO_PORT_P6, GPIO_PIN6);
          //  MAP_GPIO_enableInterrupt(GPIO_PORT_P6, GPIO_PIN6);
            MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P6, GPIO_PIN6,GPIO_HIGH_TO_LOW_TRANSITION);
    
         //   boardConfiguration=0xFF;
        }
        else
        {
            //Old Board with PUMP PWM on P6.6 and P6.7
         //   pwmConfigPumpe1.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_3;
         //   pwmConfigPumpe2.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_4;
         //   init_Pumpe(Pumpe_Port);
    
            MAP_GPIO_setAsInputPin(GPIO_PORT_P5, GPIO_PIN6);//Set Over Current Interrupt PORT 3
            MAP_GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN6);
            //MAP_GPIO_enableInterrupt(GPIO_PORT_P5, GPIO_PIN6);
            MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P5, GPIO_PIN6,GPIO_HIGH_TO_LOW_TRANSITION);
    
          //  boardConfiguration=0x00;
        }
    
    
    
        //turn_Pump_OFF(Pump_1);
        //turn_Pump_OFF(Pump_2);
    
        //init_Ventil_PWM();
        //init_Ventil();
        //open_all_ventil();
    
    
        //UART_init();
    
    
        //Power PORT set PIN Enable
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P8, GPIO_PIN4);
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P8, GPIO_PIN5);
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P8, GPIO_PIN6);
    
    
        MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P8, GPIO_PIN4);//Power OFF
        MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P8, GPIO_PIN5);//Power OFF
        MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P8, GPIO_PIN6);//Power OFF
    
    
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P3, GPIO_PIN2);
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN3);
    
        //Power PORT set INT
        MAP_GPIO_setAsInputPin(GPIO_PORT_P5, GPIO_PIN4);//Set Over Current Interrupt PORT 1
        MAP_GPIO_setAsInputPin(GPIO_PORT_P5, GPIO_PIN5);//Set Over Current Interrupt PORT 2
    
        MAP_GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN4);
        MAP_GPIO_clearInterruptFlag(GPIO_PORT_P5, GPIO_PIN5);
    
    //    MAP_GPIO_enableInterrupt(GPIO_PORT_P5, GPIO_PIN4);
    //    MAP_GPIO_enableInterrupt(GPIO_PORT_P5, GPIO_PIN5);
    
        MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P5, GPIO_PIN4,GPIO_HIGH_TO_LOW_TRANSITION);
        MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P5, GPIO_PIN5,GPIO_HIGH_TO_LOW_TRANSITION);
    
        //MAP_Interrupt_enableInterrupt(INT_PORT5);
    
        //Init_I2C_GPIO_1();
        //Init_I2C_GPIO_2();
        //Init_I2C_GPIO_3();
    
    //    I2C_init_1();
    //    I2C_init_2();
    //    I2C_init_3();
    
    //    MS5525DSO_SPI_INIT();
    //    set_all_CS_High();
    //    MS5525DSO_Setup_Sensor(1);//init Pressure Sensor 1
    //    MS5525DSO_Setup_Sensor(2);//init Pressure Sensor 2
    //    MS5525DSO_Setup_Sensor(3);//init Pressure Sensor 3
    //    MS5525DSO_Setup_Sensor(4);//init Pressure Sensor 4
    //    MS5525DSO_Setup_Sensor(5);//init Pressure Sensor 5
    //    MS5525DSO_Setup_Sensor(6);//init Pressure Sensor 6
    //    MS5525DSO_Setup_Sensor(7);//init Pressure Sensor 7
    
    
         /*Initialize TMP006 temperature sensor */
        //MLX90615_init();
        //LIS2H_Init(2, LIS2H_I2C_ADD);//Init Accelerometer
    
         /* Configuring GPIO2.4 as peripheral output for PWM for ADPD105 */
        MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN4,GPIO_PRIMARY_MODULE_FUNCTION);
        //MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN5,GPIO_PRIMARY_MODULE_FUNCTION);
        //MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN6,GPIO_PRIMARY_MODULE_FUNCTION);
        //MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN7,GPIO_PRIMARY_MODULE_FUNCTION);
    
       // EXTREMITIES = 0;
       // Flag_CIS_OHR=0;
        //Zustand=0;
        MAP_Interrupt_enableMaster();
    
         MAP_SysCtl_setWDTTimeoutResetType(SYSCTL_SOFT_RESET);
    //     MAP_WDT_A_initWatchdogTimer(WDT_A_CLOCKSOURCE_SMCLK, WDT_A_CLOCKDIVIDER_128M);
         MAP_WDT_A_initWatchdogTimer(WDT_A_CLOCKSOURCE_SMCLK, WDT_A_CLOCKDIVIDER_8192K);
         // Setting our SysTick to wake up every 128000 clock iterations to service the dog.
        MAP_SysTick_enableModule();
    //    MAP_SysTick_setPeriod(48000000);
        MAP_SysTick_setPeriod(3000000);
        MAP_SysTick_enableInterrupt();
        MAP_WDT_A_startTimer();
    
        /*
         * debug
         */
        MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN0);
        MAP_GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0);
    
        while(1)
        {
            /*
             * run Systick 20 times before enabling bsl
             */
            if(tickCounter > SYSTICK_TIMEOUT)
            {
                MAP_WDT_A_holdTimer();
                tickCounter = 0;
                MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN0);
                MAP_GPIO_setAsInputPin(GPIO_PORT_P1, GPIO_PIN0);
    
                /*
                 * Fix, disable the systick
                 */
                MAP_SysTick_disableInterrupt();
                MAP_SysTick_disableModule();
    
              //  VALUE=0;
                MAP_Interrupt_disableMaster();
    
                NVIC->ICER[0] = 0xFFFF;
                NVIC->ICPR[0] = 0xFFFF;
                NVIC->ICER[1] = 0xFFFF;
                NVIC->ICPR[1] = 0xFFFF;
                BSL_INVOKE(0xFC48FFFF);//BSL_CONFIG_INTERFACE_UART);<---------------This doesnt work
            }
          //
        }
    }
    

    Regards,

    Chris

  • Hi Chris,
    in my project it doens work.
    I get this error message from BSL Scripter:

    Script example MSP432 UART BSL
    Download application to MSP432 device through UART BSL
    MODE P4xx UART 9600 /dev/ttymxc3 PARITY
    Initialization of BSL P432 succeed!
    CHANGE_BAUD_RATE 115200
    Baud rate change is successful!
    RX_PASSWORD_32 pass256_wrong.txt
    Read Txt File : /home/devel/MSP432/SourceCode/MSP432/pass256_wrong.txt
    [ERROR_MESSAGE]BSL Password is error!\
    RX_PASSWORD_32 pass256_default.txt
    Read Txt File : /home/devel/MSP432/SourceCode/MSP432/pass256_default.txt
    BSL Password is correct!\n\
    MASS_ERASE
    Mass Erase is successful!
    RX_DATA_BLOCK_32 mycode.txt
    Read Txt File : /home/devel/MSP432/SourceCode/MSP432/vasoport.txt
    ACK_ERROR_MESSAGE]Unknown ACK value!
    Time elapsed of writing 512 bytes : 2.019 seconds
    Speed of writing data :0.2477(kB/s)
    TX_BSL_VERSION_32
    ACK_ERROR_MESSAGE
    Unknown ACK value!
    TX_DATA_BLOCK_32 0x0000 0x4000 ReadBlock_MSP432P401R.txt
    Write Txt File : /home/devel/MSP432/SourceCode/MSP432/ReadBlock_MSP432P401R.txt
    ACK_ERROR_MESSAGE
    Unknown ACK value!
    Time elapsed of reading 0 bytes : 1.01 seconds
    Speed of reading data : 0(kB/s)
    REBOOT_RESET

    Should i send you my whole project? can you please give me your email address?
  • Michael,

       I am afraid that I have been working from the original description which stated that "If i call this function right after some initialisation it doesnt responde to BSL Scripter at all."

        I missed from your previous post that the BSL scripter is successful in communicating until reading the .txt file.  I will try and work with my colleague to understand what might be happening.

    Chris  

  • HI Michael,

    could you please try this step:

     MODE P4xx UART 115200 COM<number>

    RX_PASSWORD_32 .. // make sure BSL is unlocked correctly

    TX_BSL_VERSION_32 // to check if communication is okay

    RX_DATA_BLOCK_32 ..

    MSP432P4 BSL shall be able to be configured with the high speed directly.  I also use the Hardware invocation on my test setup from time to time, and it should work. Other thing to be considered:

    1. to enable the HW invocation I assume you are using the flashmailbox example
    2. once you setup the mailbox, reset the device and check if the BSL configuration section has ACE acknowledge bytes
    3. before you run the bsl scripter, make sure the polarity is already applied on the selected pin
    4. then reset the device before you run bsl scripter

    Which MSP432P4x revision are you using? is it MSP432P401xrev C or D ? or MSP432P4111? Because we have several updates of the bootloader software as well.

  • Hi Fatmawati,

    HW invocation works perfect for me. The SW bsl invocation doesnt work.
    So i send Chris my source code project and maybe you can find something that is conflicting with SW bsl invoke.
    I have tryied everything already but still doenst work.

    Why i want to use SW instead of HW is because i need 2 extra wires to connect to MSP432 from CPU. The Reset and GPIO for HW invoke.

    With SW bsl invoke i only need RX and TX from UART right? I am planing to use MSP432 connected with a 3meter cable to the CPU. So the less wire i have the cheaper the price for the cable.

    Best regards,

    Michael

**Attention** This is a public forum