Part Number: MSP430FR6047
Hi,
I was wandering for the reason of the "retry"? Its in a project called "MSP432Host_UART_BSL_MSP430FR", part of Simplelink MSP432 SDK.
int BSL_main()
{
bool result = true;
UART_Initialize();
uint8_t retry = MAX_RETRY;
while (retry)
{
Debug_UART_printString("\r\n\r\n*****New Attempt*****\r\n\r\n");
BSLEntrySequence();
MsDelay(100);
result = WritePasswordDefault();
if (!result)
{
Debug_UART_printString("Write password failed\r\n");
retry --;
continue;
}
Debug_UART_printString("Write Password was successful\r\n");
uint8_t deviceIDBytes[2] = {0};
result = ReadMemory(0x1A04, 2, deviceIDBytes);
if (!result)
{
Debug_UART_printString("Device ID read failed\r\n");
retry --;
continue;
}
uint16_t deviceID = deviceIDBytes[0] << 8 | deviceIDBytes[1];
Debug_UART_printStringWithNumber("Device ID: 0x%X\r\n", deviceID);
result = ProgramMSP430();
if (!result)
{
Debug_UART_printString("\r\nMSP430 programming failed\r\n");
retry --;
continue;
}
Debug_UART_printString("\r\nMSP430 programmed successfully\r\n");
UART_Close();
Reset();
Debug_UART_printString("Device is reset\r\n");
return 0;
}
UART_Close();
Debug_UART_printString("Max retries exceeded\r\n");
return 1;
}
rgds,
Laurent van Poppelen