MSPM0G1106: BSL Response Ack Byte

Part Number: MSPM0G1106

Hi team,

I'm a bit confused about which byte in the BSL response to read to get the proper BSL Acknowledgement.

According to the following section in the "MSPM0 Bootloader User's Guide", the acknowledgement seems to be the first byte within the BSL response.

image.png 

As is shown in the following examples:

image.png

 

 

image.png

 

However, in the following SDK BSL code example, the Host_BSL_getResponse() function is written to check the byte[4] of the response for the acknowledgement instead of the first byte.

//*****************************************************************************
//
// ! Host_BSL_getResponse
// ! For those function calls that don't return specific data.
// ! Returns errors.
//
//*****************************************************************************
BSL_error_t Host_BSL_getResponse(void)
{
    BSL_error_t bsl_err = eBSL_success;

    UART_readBuffer(BSL_RX_buffer, (HDR_LEN_CMD_BYTES + ACK_BYTE + CRC_BYTES));
    //   Get ACK value
    bsl_err = BSL_RX_buffer[HDR_LEN_CMD_BYTES + ACK_BYTE - 1];
    //   Return ACK value
    return (bsl_err);
}

For your information, HDR_LEN_CMD_BYTES = 4, ACK_BYTE = 1.

 

Am I safe to take the first byte of the response as the Ack byte? or do I need to follow the implementation of the above mentioned function?

I'd appreicate the clarification on this matter.

Thank you,

Kyungjae Lee

  • Hello Kyungjae,

    Yes, I think you are correct.  BSL ACK always before Core response.  Should be returning byte [0] in my opinion as well.  

    Which SDK example is it?  I'll submit a request for an update to the software team.  

    Thanks,

    JD