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.

MSP432P401R: BSL example code

Part Number: MSP432P401R

I am trying to implement the BSL code on an existing board the main problem I have is that the interface uses UART 3 and I need to initialise it via a software interrupt  when using the scripter it appear that once the code has got the initialised response to FF that it sends the password script and image without waiting for a response in between 

  • I will pass this feedback to the BSL (scripter) owner. The source for both the scripter and the BSL are available so that you can add features as needed.

    software-dl.ti.com/.../index_FDS.html

    software-dl.ti.com/.../index_FDS.html

    Regards,
    Chris
  • Hello Shane,

    could you mentioned which Scripter version you are using?
    There should be delay between communication. It would be great if you could provide the log file.
  • Hello Fatmawati the log is as below

    ---------------------------------------------------------
    BSL Scripter 3.3.0
    PC software for BSL programming
    2018-May-10 15:55:17
    ---------------------------------------------------------
    Input file script is : C:/projects/MSPBSL_Scripter_win/bsl-scripter-windows/script_P4xx_uart.txt
    MODE P4xx UART 57600 COM11 NO_PARITY
    VERBOSE
    Verbose mode is now on!
    //RX_PASSWORD_32 .\pass256_wrong.txt
    RX_PASSWORD_32 .\pass256_default.txt
    Read Txt File : C:\projects\MSPBSL_Scripter_win\bsl-scripter-windows\pass256_default.txt
    [80] [01] [01] [21] [00] [00] [01] [20] [6d] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [00] [00] [00] [00] [00] [00] [00] [00] [00] [00] [00] [00] [00] [00] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [00] [00] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00] [79] [32] [00] [00]
    [79] [32] [00] [00] [79] [32] [00] [00] [08] [b5] [00] [20] [01] [21] [02] [f0]
    [1b] [ff] [01] [20] [01] [21] [02] [f0] [17] [ff] [00] [20] [02] [f0] [c0] [ff]
    [02] [20] [02] [21] [05] [33]
    <00>
    [ACK_ERROR_MESSAGE]Header incorrect!
    MASS_ERASE
    [80] [01] [00] [15] [64] [a3]
    <00>
    [ACK_ERROR_MESSAGE]Unknown ACK value!
    RX_DATA_BLOCK_32 Blink_LED.txt
    Read Txt File : C:\projects\MSPBSL_Scripter_win\bsl-scripter-windows\Blink_LED.txt
    [80] [05] [01] [20] [00] [01] [00] [00] [00] [68] [00] [f0] [07] [00] [00] [90]
    [12] [e1] [aa] [48] [00] [78] [60] [b3] [a9] [49] [46] [f6] [5a] [10] [08] [60]
    [a8] [49] [08] [68] [40] [f0] [01] [00] [08] [60] [a5] [49] [01] [20] [08] [60]
    [a2] [48] [00] [78] [a0] [b1] [a4] [48] [00] [78] [40] [b1] [9d] [f8] [08] [00]
    [a2] [49] [4f] [f4] [fa] [32] [b2] [fb] [f0] [f0] [08] [60] [06] [e1] [9d] [f8]
    [08] [00] [9e] [49] [4f] [f4] [fa] [42] [b2] [fb] [f0] [f0] [08] [60] [fd] [e0]
    [9d] [f8] [08] [00] [99] [49] [4f] [f4] [00] [42] [b2] [fb] [f0] [f0] [08] [60]
    [f4] [e0] [9d] [f8] [08] [00] [95] [49] [4f] [f4] [00] [42] [b2] [fb] [f0] [f0]
    [08] [60] [eb] [e0] [9d] [f8] [08] [00] [90] [49] [42] [f2] [10] [72] [b2] [fb]
    [f0] [f0] [08] [60] [e2] [e0] [8c] [48] [00] [78] [40] [b1] [9d] [f8] [08] [00]
    [8a] [49] [4f] [f4] [fa] [32] [b2] [fb] [f0] [f0] [08] [60] [d6] [e0] [9d] [f8]
    [08] [00] [86] [49] [4f] [f4] [fa] [42] [b2] [fb] [f0] [f0] [08] [60] [cd] [e0]
    [83] [48] [00] [68] [6f] [f3] [9f] [20] [ad] [f8] [18] [00] [11] [e0] [81] [48]
    [05] [90] [22] [e0] [80] [48] [05] [90] [1f] [e0] [80] [48] [05] [90] [1c] [e0]
    [7f] [48] [05] [90] [19] [e0] [7f] [48] [05] [90] [16] [e0] [7e] [48] [05] [90]
    [13] [e0] [77] [48] [00] [68] [10] [f4] [e0] [20] [e8] [d0] [b0] [f5] [80] [30]
    [e8] [d0] [b0] [f5] [80] [30] [e8] [d0] [47] [1e]
    <00>
    [ACK_ERROR_MESSAGE]Unknown ACK value!
    [80] [05] [01] [20] [00] [02] [00] [00] [b0] [f5] [80] [30] [e8] [d0] [b0] [f5]
    [80] [30] [e8] [d0] [b0] [f5] [80] [30] [e8] [d0] [bd] [f9] [18] [00] [18] [b9]
    [05] [98] [6a] [49] [08] [60] [99] [e0] [bd] [f9] [18] [00] [40] [0b] [05] [d3]
    [bd] [f9] [18] [00] [40] [f4] [70] [40] [ad] [f8] [18] [00] [6b] [48] [00] [78]
    [30] [b1] [6b] [48] [00] [68] [03] [90] [6a] [48] [00] [68] [04] [90] [05] [e0]
    [69] [48] [00] [68] [03] [90] [69] [48] [00] [68] [04] [90] [04] [98] [dd] [ed]
    [03] [0a] [c0] [f5] [40] [70] [00] [ee] [10] [0a] [b8] [ee] [c0] [1a] [b7] [ee]
    [00] [0a] [01] [ee] [20] [0a] [dd] [ed] [03] [0a] [bd] [f9] [18] [00] [01] [ee]
    [10] [0a] [f2] [ee] [00] [1a] [b8] [ee] [c1] [1a] [20] [ee] [21] [0a] [61] [ee]
    [20] [0a] [80] [ee] [80] [0a] [05] [98] [00] [ee] [90] [0a] [b7] [ee] [00] [1a]
    [f8] [ee] [60] [0a] [31] [ee] [40] [0a] [80] [ee] [80] [0a] [bc] [ee] [c0] [0a]
    [46] [49] [10] [ee] [10] [0a] [08] [60] [50] [e0] [9d] [f8] [08] [20] [49] [48]
    [42] [49] [b0] [fb] [f2] [f0] [08] [60] [48] [e0] [4d] [48] [00] [78] [58] [b3]
    [3b] [49] [46] [f6] [5a] [10] [08] [60] [3a] [49] [08] [68] [40] [f0] [02] [00]
    [08] [60] [37] [49] [01] [20] [08] [60] [45] [48] [00] [78] [a0] [b1] [36] [48]
    [00] [78] [40] [b1] [9d] [f8] [08] [00] [34] [49] [4f] [f4] [fa] [32] [b2] [fb]
    [f0] [f0] [08] [60] [2a] [e0] [9d] [f8] [a6] [af]
    <00>
    [ACK_ERROR_MESSAGE]Unknown ACK value!
    [80] [05] [01] [20] [00] [03] [00] [00] [08] [00] [30] [49] [4f] [f4] [fa] [42]
    [b2] [fb] [f0] [f0] [08] [60] [21] [e0] [9d] [f8] [08] [20] [32] [48] [2b] [49]
    [b0] [fb] [f2] [f0] [08] [60] [19] [e0] [9d] [f8] [08] [20] [2e] [48] [27] [49]
    [b0] [fb] [f2] [f0] [08] [60] [11] [e0] [00] [98] [00] [28] [3f] [f4] [e9] [ae]
    [40] [1e] [3f] [f4] [1f] [af] [40] [1e] [3f] [f4] [25] [af] [40] [1e] [3f] [f4]
    [37] [af] [40] [1e] [b1] [d0] [40] [1e] [b7] [d0] [ff] [e7] [08] [b0] [70] [47]
    [28] [49] [08] [68] [40] [f4] [70] [00] [08] [60] [27] [49] [4f] [f4] [b5] [40]
    [08] [80] [26] [49] [80] [20] [08] [60] [11] [49] [46] [f6] [5a] [10] [08] [60]
    [13] [49] [4f] [f4] [80] [30] [08] [60] [0b] [48] [0b] [49] [00] [68] [20] [f0]
    [07] [10] [40] [f0] [03] [00] [08] [60] [09] [49] [00] [20] [08] [60] [1c] [48]
    [1b] [49] [00] [68] [20] [f0] [30] [00] [08] [60] [1a] [48] [19] [49] [00] [68]
    [20] [f0] [30] [00] [08] [60] [70] [47] [08] [04] [01] [40] [00] [89] [20] [42]
    [00] [04] [01] [40] [50] [04] [01] [40] [3c] [86] [20] [42] [18] [00] [00] [20]
    [04] [04] [01] [40] [60] [e3] [16] [00] [c0] [c6] [2d] [00] [80] [8d] [5b] [00]
    [00] [1b] [b7] [00] [00] [36] [6e] [01] [00] [6c] [dc] [02] [d8] [80] [20] [42]
    [84] [10] [20] [00] [6c] [10] [20] [00] [64] [10] [20] [00] [4c] [10] [20] [00]
    [04] [89] [20] [42] [88] [ed] [00] [e0] [d2] [cf]
    <00>
    [ACK_ERROR_MESSAGE]Unknown ACK value!
    [80] [05] [01] [20] [00] [04] [00] [00] [0c] [48] [00] [40] [14] [30] [04] [e0]
    [10] [10] [01] [40] [14] [10] [01] [40] [00] [2a] [4a] [d0] [5f] [ea] [00] [0c]
    [8b] [07] [1c] [d1] [83] [07] [22] [d1] [10] [2a] [08] [d3] [70] [b4] [10] [3a]
    [78] [c9] [78] [c0] [10] [3a] [fb] [d2] [70] [bc] [10] [32] [38] [d0] [04] [2a]
    [2c] [d3] [08] [2a] [05] [d3] [0c] [2a] [24] [bf] [08] [c9] [08] [c0] [08] [c9]
    [08] [c0] [08] [c9] [08] [c0] [92] [07] [2a] [d0] [92] [0f] [22] [e0] [0b] [78]
    [03] [70] [49] [1c] [40] [1c] [52] [1e] [22] [d0] [8b] [07] [f7] [d1] [c3] [07]
    [14] [d1] [83] [07] [d8] [d0] [12] [1f] [12] [d3] [08] [c9] [03] [80] [1b] [0c]
    [43] [80] [00] [1d] [12] [1f] [f8] [d2] [0a] [e0] [08] [c9] [03] [70] [1b] [0a]
    [43] [70] [1b] [0a] [83] [70] [1b] [0a] [c3] [70] [00] [1d] [12] [1f] [f4] [d2]
    [12] [1d] [05] [d0] [0b] [78] [03] [70] [49] [1c] [40] [1c] [52] [1e] [f9] [d1]
    [60] [46] [70] [47] [00] [22] [13] [46] [0a] [46] [19] [46] [71] [b5] [10] [f0]
    [03] [0f] [0b] [d0] [00] [2a] [82] [bf] [00] [f8] [01] [1b] [b2] [f1] [01] [02]
    [10] [f0] [03] [0f] [f6] [d1] [00] [2a] [08] [bf] [71] [bd] [11] [f0] [ff] [01]
    [41] [ea] [01] [21] [04] [2a] [18] [d3] [41] [ea] [01] [41] [08] [2a] [0f] [d3]
    [0e] [46] [10] [2a] [08] [d3] [0c] [46] [0d] [46] [b2] [f1] [0f] [03] [12] [f0]
    [0f] [02] [72] [c0] [10] [3b] [fc] [d8] [d1] [2a]
    <00>
    [ACK_ERROR_MESSAGE]Unknown ACK value!
    [80] [05] [01] [20] [00] [05] [00] [00] [12] [f0] [08] [0f] [18] [bf] [42] [c0]
    [12] [f0] [04] [0f] [18] [bf] [40] [f8] [04] [1b] [12] [f0] [02] [0f] [18] [bf]
    [20] [f8] [02] [1b] [12] [f0] [01] [0f] [18] [bf] [01] [70] [71] [bd] [70] [47]
    [14] [48] [b0] [b5] [b0] [f1] [ff] [3f] [01] [d0] [00] [f0] [bb] [f8] [12] [4d]
    [12] [48] [a8] [42] [10] [d0] [12] [48] [12] [4c] [a0] [42] [0c] [d0] [00] [1b]
    [08] [3c] [c7] [10] [54] [f8] [08] [0f] [01] [78] [55] [f8] [21] [20] [61] [68]
    [40] [1c] [90] [47] [7f] [1e] [f5] [d1] [00] [f0] [4f] [f8] [0a] [4d] [0b] [4c]
    [a5] [42] [05] [d0] [02] [e0] [54] [f8] [04] [0b] [80] [47] [a5] [42] [fa] [d1]
    [b0] [bd] [c0] [46] [ff] [ff] [ff] [ff] [b4] [07] [00] [00] [bc] [07] [00] [00]
    [c4] [07] [00] [00] [bc] [07] [00] [00] [00] [00] [00] [00] [00] [00] [00] [00]
    [2d] [e9] [f0] [41] [05] [46] [15] [f8] [01] [7b] [90] [46] [0e] [46] [1c] [e0]
    [b8] [f1] [00] [0f] [05] [f1] [01] [05] [0b] [d0] [ff] [2c] [09] [d8] [02] [20]
    [15] [f8] [01] [1b] [40] [1e] [41] [ea] [04] [24] [f9] [d1] [01] [e0] [04] [2c]
    [02] [d3] [15] [f8] [01] [1b] [00] [e0] [39] [46] [30] [46] [22] [46] [ff] [f7]
    [6d] [ff] [a6] [19] [01] [e0] [06] [f8] [01] [0b] [15] [f8] [01] [0b] [87] [42]
    [f9] [d1] [15] [f8] [01] [4b] [00] [2c] [e9] [d1] [15] [f8] [01] [0b] [2c] [78]
    [00] [02] [24] [18] [d4] [d1] [bd] [e8] [e9] [9f]
    <00>
    [ACK_ERROR_MESSAGE]Unknown ACK value!
    [80] [05] [01] [20] [00] [06] [00] [00] [f0] [81] [70] [47] [4e] [f6] [88] [51]
    [ce] [f2] [00] [01] [08] [68] [4f] [f0] [f0] [03] [40] [ea] [03] [40] [08] [60]
    [0c] [48] [85] [46] [0c] [48] [85] [44] [6f] [46] [07] [20] [87] [43] [bd] [46]
    [0a] [48] [6f] [46] [07] [60] [ff] [f7] [7a] [ff] [00] [f0] [ac] [f8] [00] [28]
    [01] [d0] [ff] [f7] [75] [ff] [00] [f0] [7f] [f8] [01] [20] [00] [f0] [0e] [f8]
    [fe] [e7] [c0] [46] [00] [fe] [00] [20] [00] [02] [00] [00] [14] [00] [00] [20]
    [00] [bf] [70] [47] [08] [b5] [ff] [f7] [fb] [ff] [fe] [e7] [38] [b5] [0d] [4c]
    [05] [46] [a0] [68] [20] [b1] [0c] [48] [b0] [f1] [ff] [3f] [00] [d0] [80] [47]
    [0a] [48] [00] [68] [80] [47] [60] [68] [10] [b1] [01] [46] [28] [46] [88] [47]
    [20] [68] [00] [b1] [80] [47] [06] [48] [00] [68] [80] [47] [ff] [f7] [e2] [ff]
    [38] [bd] [c0] [46] [00] [00] [00] [20] [ff] [ff] [ff] [ff] [0c] [00] [00] [20]
    [10] [00] [00] [20] [f8] [b5] [06] [46] [0f] [4d] [10] [4f] [73] [88] [00] [24]
    [17] [e0] [a0] [00] [00] [eb] [c4] [00] [32] [18] [51] [68] [90] [68] [d2] [68]
    [52] [b9] [af] [42] [0b] [d0] [0a] [78] [55] [f8] [22] [20] [03] [46] [49] [1c]
    [08] [46] [19] [46] [90] [47] [01] [e0] [ff] [f7] [96] [fe] [73] [88] [64] [1c]
    [a4] [b2] [a3] [42] [e5] [dc] [f8] [bd] [b4] [07] [00] [00] [bc] [07] [00] [00]
    [ad] [f1] [08] [0d] [0d] [49] [4f] [f4] [5f] [c4]
    <00>
    [ACK_ERROR_MESSAGE]Unknown ACK value!
    [80] [97] [00] [20] [00] [07] [00] [00] [b5] [40] [08] [80] [0c] [49] [08] [78]
    [40] [f0] [01] [00] [08] [70] [0b] [49] [08] [78] [80] [f0] [01] [00] [08] [70]
    [42] [f2] [10] [70] [00] [90] [00] [98] [00] [28] [f4] [d0] [00] [98] [40] [1e]
    [00] [90] [00] [98] [00] [28] [f9] [d1] [ed] [e7] [c0] [46] [0c] [48] [00] [40]
    [04] [4c] [00] [40] [02] [4c] [00] [40] [04] [49] [b1] [f1] [ff] [3f] [07] [bf]
    [00] [21] [08] [1c] [08] [68] [09] [1d] [ff] [f7] [d2] [bf] [ff] [ff] [ff] [ff]
    [03] [49] [08] [60] [70] [47] [02] [49] [09] [1f] [08] [60] [70] [47] [70] [47]
    [10] [00] [00] [20] [d0] [f8] [03] [20] [c3] [1d] [08] [46] [19] [46] [ff] [f7]
    [4b] [be] [08] [b5] [ff] [f7] [ec] [fd] [ff] [f7] [40] [bf] [08] [bd] [fe] [e7]
    [01] [22] [ff] [f7] [05] [bf] [01] [20] [70] [47] [4b] [bb]
    <00>
    [ACK_ERROR_MESSAGE]Unknown ACK value!
    [80] [31] [00] [20] [98] [07] [00] [00] [00] [02] [02] [08] [00] [01] [00] [00]
    [00] [67] [07] [00] [00] [67] [07] [02] [06] [00] [c0] [c6] [2d] [00] [02] [00]
    [00] [00] [00] [00] [89] [07] [00] [00] [6d] [07] [00] [00] [98] [07] [00] [00]
    [00] [00] [00] [20] [dd] [9f]
    <00>
    [ACK_ERROR_MESSAGE]Unknown ACK value!
    Time elapsed of writing 1726 bytes : 1.055 seconds
    Speed of writing data :1.598(kB/s)
    //RX_DATA_BLOCK_32 Blink_LED.hex
    TX_BSL_VERSION_32
    [80] [01] [00] [19] [e8] [62]
    <00>
    [ACK_ERROR_MESSAGE]Unknown ACK value!
    TX_DATA_BLOCK_32 0x0000 0x4000 ReadBlock_MSP432P401R.txt
    Write Txt File : C:/projects/MSPBSL_Scripter_win/bsl-scripter-windows/ReadBlock_MSP432P401R.txt
    [ACK_ERROR_MESSAGE]Unknown ACK value!

    the first  [ACK_ERROR_MESSAGE]Header incorrect! shouldn't be received as I am running under debug and put a break point on the call to the password function  so  didn't  expect for it to progress further than that point.

    Regards

    Shane

  • Hi Shane,

    the first row: MODE P4xx UART ....
    shall return status is Bootloader is initialized or not.

    First of all I would like to suggest you to use the newest version, where some bugs were already fixed: software-dl.ti.com/.../index_FDS.html

    Second of all, what connects your pc with the target board? are you using the launchpad? If you are using the launchpad, please make sure that the com port refer to the Application UART, not the Debug Port.

    third thing, when you are calling the BSL via software--from your application, make sure you disable the interrupt as describe in the example in section 3.3.1 in www.ti.com/lit/slau622
  • Hi Fatmawati

    As I said originally it is using UART 3 I receive the initial 0xff as part of the baud rate setting it is just that when it sends the password from the script file I get a fail before the launchpad has even replied ( it is held at a breakpoint so can't respond) however the pc end then fails it and issues a mass erase as expected and transmits an image.

    Regards

    Shane
  • Shane,
    Thanks for restating the problem. I will ask that this be added as a feature to future versions of the scripter. For your specific application is this part of the debug and development or will the end application also require the BSL to wait on a response from the target?

    Regards,
    Chris

**Attention** This is a public forum