Other Parts Discussed in Thread: UNIFLASH
Hello,
I am trying to flash the program using BSL scripter on MSP432 launchpad. I have used BSL software invocation method as mentioned below. It gets stuck on the initialization.
MODE P4xx UART 115200 COM10 PARITY
[ERROR_MESSAGE]Initialization of P4xx BSL failed! Exit the scripter!
Program:-->
volatile bool jumpToBsl = false;
int main()
{
int i=0;
// Stop watchdog
MAP_WDT_A_holdTimer();
// Setup P2.0 with LED output to detect if the interrupt occurs
MAP_GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN0);
// Configure P1.1 as an input and enabling the interrupt
MAP_GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P1, GPIO_PIN1);
MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P1, GPIO_PIN1, GPIO_HIGH_TO_LOW_TRANSITION);
MAP_GPIO_clearInterruptFlag(GPIO_PORT_P1, GPIO_PIN1);
MAP_GPIO_enableInterrupt(GPIO_PORT_P1, GPIO_PIN1);
MAP_Interrupt_enableInterrupt(INT_PORT1);
MAP_Interrupt_enableMaster();
while(1)
{
MAP_GPIO_toggleOutputOnPin(GPIO_PORT_P2, GPIO_PIN0);
__delay_cycles(2000000);
if (jumpToBsl)
{
jumpToBsl = false;
MAP_Interrupt_disableMaster();
// Setup interrupt priorities into 0x00 before entering bootloader
for (i=0; i < 240; i++) NVIC->IP[i] = 0;
NVIC->ICER[0] = 0xFFFF;
NVIC->ICPR[0] = 0xFFFF;
NVIC->ICER[1] = 0xFFFF;
NVIC->ICPR[1] = 0xFFFF;
// Call the BSL with given BSL parameters
((void (*)())BSL_ENTRY_FUNCTION)((uint32_t)BSL_PARAM);
}
}
}
void PORT1_IRQHandler(void)
{
uint32_t status;
status = MAP_GPIO_getEnabledInterruptStatus(GPIO_PORT_P1);
MAP_GPIO_clearInterruptFlag(GPIO_PORT_P1, status);
/* Toggling the output on the LED */
if(status & GPIO_PIN1)
{
jumpToBsl = true;
}
}
I have tried to flash new BSL program as mentioned below :
a. Project Properties > Debug > MSP432 Settings > Erase Method > Erase main and information memory
b. Allow BSL information memory erase
But still not working
Any help will be appreciated.
Thanks.
