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.
i used MSP-FET to download program to MSP432 through UART BSL(using bsl scripter software on PC),and here is a strange problem:
at the first time when the MSP432 is blank, i can downed program fuctionally, and i configured the BSL params using flashmailbox at the same time.
then i erased main flash as well as flashmailbox,and i try to down program to MSP432 through BSL using MSP-FET,but i failed to do that. why this happened?
i have read the BSL space on the MSP432, and the BSL code is still inside.
normally it can downed program to msp432 using MSP-FET through bsl interface whenever the msp432 is blank.
why this happened ?
hi Katie Pier
(1)what i have wrote to BSL_PARAMS eara is just as follows:
(2) after the BSL_PARAMS has been wrote,i reboot the MSP432,and you can see that
the address 0x002001f4's value is 0x00000ACE,it indicates that BSL_COMAND has excuted correctly.
(3) after the step above,i erased the flashmailbox. at last i erase the whole main flash using MSP-GANG and try to download program to MSP432 using BSL interface, and i failed to do that just as describled yesterday.
Hi Kissn,
Could you please confirm that the BSL section was not erased, from 0x202000 to 0x203FFF?? Also, the factory reset will not restore the boot configurations therefore please use the BSL example code in the SLAA659 App Report to restore these boot configurations.
Ok, could you please try the following:
1. Confirm that the BSL section was not erased. If it was erased, you will need to restore the BSL. Please download the BSL from here
2. If the BSL was not erase, please run the bsl config example code from the SLAA659 (it should restore the default boot configurations).
3. Run factory reset, this should erase the flash - bsl default entry.
4. Try to connect to the bsl using the MSP FET
Best regards,
David
hi,DavidL
(1)i have done what you said in order, after the 3th step according to your advice,and i read the msp432 via MSP-GANG,
(2) after that i failed to conect to bsl using msp-fet too!
so i am superised that :
if i don't configure bsl through flashmailbox on the msp432,i can use msp-fet to conect to msp432 whenevr the main flash is blank. if i do bsl configuration using flashmailbox, i can not use msp-fet to download program to msp432 via bsl.
(3) would you try what you said on msp432 launchpad and give me a feedback.
this question has confused me so long. could i have your mail address to solve this issue as soon as possible?
my mail address is kissn-liu@serialsuccesschina.com
best regards
Kissn Liu
Hi Kissn Liu,
Sorry I forgot to mention that the bsl config example code configures P1.1 as HW entry.
/* BSL Parameter * Use HW Invoke on Port 1, Pin 1, on HIGH * Use UART */
Please use this file msp432_flashmailbox.c instead and let me know if were able to communicate with the BSL when the flash is erased.
Regards,
David
Hi David,
I looked at the C file you posted. It looks like you're using Port0, Pin5 as the BSL invocation. Is that correct?
So my question is: unlike the FR5969 (and other MSP's), if I get a blank MSP432P4xx from production, never been programmed, I cannot use the BSL H/W Invocation since its all F's?? If so, why is the appNote SLAU622 on page 16, Figure 6 showing P1.0?
Also, second question. I've changed the msp432_flashmailbox.c file to add the Reserved bits of 0x1f to the invoke parameters and noticed under Code Composer (CC), they show up as zeros. When I'm using IAR EW 7.60.1 version, I cannot see the data at all. It's all F's
Could you expand on why IAR cannot show the BOM and CC can and why CC cannot show the Reserved bits as F's
One more thing, with the file you posted, I still cannot get the BSL to talk to the BSL_Scripter.exe version 3.1.0.0. I assume I should be using P0.5, pulling it high while holding the RSTn switch on the Launchpad dev board?
Thanks,
-Jim
Additional:
It appears I can get the CC (version 6.1.1.00022) to show the correct Flash Mailbox data at address 0x0020201E8 by powering down the Lauchpad. But just by changing the data of the BSL_PARAMS, cleaning, rebuilding and downloading, does not show the updated data.
That said, I'm following the code example of AppNote SLAA659 and notice when I pass in COMMAND_BSL_CONFIG (0x00020000), the code (result = BOOT_OVERIDE_OPERATION_FAIL) returns failure:
if(flashMailboxCommand & COMMAND_BSL_CONFIG) { if(*((uint32_t*)(ACK_BSL_CONFIG)) != 0xACE) { result = BOOT_OVERRIDE_OPERATION_FAIL; } }
Here is a copy of my Boot Override Mailbox (BOM):
Do you see any errors as to why I wouldn't get an 0xACE (ack)? As a matter of fact, I do not even know how the ACK (0xACE) even appears in the BOM address offset of 0x1F4.
FlashMailBox
0115ACF6 00020000 FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF FFFFFFFF FFFF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FFF FFFFFFFF FFFFFFFF 0011E11D
This is what I assume: 1.) The H/W invocation of getting into the BSL from toggling RST/Port_X.X is not available (like on the other MSP430 micro's) because the BOM comes from the Factory erased and needs to be JTAG'ed with code to put in (stating the BSL_PARAMS to act upon).
I still cannot BSL the via P1.5 on the Launchpad (0x7C48DF50). I also cannot see the data at address 0x00200000 using IAR. I can see the data at said address with the same compiled code using Code Composer. Maybe there is a option in IAR I'm missing (and yes, I've read the SLAU574C appNote).
Any ideas or help appreciated.
Thanks,
-Jim
Hi Jim,
Let me try to address your multiple questions.
Jim Patten said:I looked at the C file you posted. It looks like you're using Port0, Pin5 as the BSL invocation. Is that correct?
I think you meant Port1 Pin5 and yes that is correct.
Jim Patten said:So my question is: unlike the FR5969 (and other MSP's), if I get a blank MSP432P4xx from production, never been programmed, I cannot use the BSL H/W Invocation since its all F's?? If so, why is the appNote SLAU622 on page 16, Figure 6 showing P1.0?
If you get a blank MSP432P4xx, the BSL will be called by the ROM bootcode (memory is erased). The bootcode reads out addresses 0x0 and 0x4 from the application flash memory and compares it with 0xFFFFFFFF to determine whether or not the application memory is erased. So in this case, with or without HW entry the BSL will be called. In regards to SLAU622 showing P1.0, it is just a HW entry example when P1.0 is configured AND the application memory is NOT erased.
Jim Patten said:One more thing, with the file you posted, I still cannot get the BSL to talk to the BSL_Scripter.exe version 3.1.0.0. I assume I should be using P0.5, pulling it high while holding the RSTn switch on the Launchpad dev board?
Are using the Launchpad and the UART Backchannel? In my case I have a jumper wire connected from P1.5 to 3.3V and then I press/release the reset button. After that I run the bsl scripter like this (please make sure to add the PARITY option on the mode, needed if you are using the LP BackChannel):
D:\MSPBSL_Scripter_win\BSL_Scripter_Windows\ScriptExample\P4xx_uart>..\..\bsl-scripter-windows.exe script_P4xx_uart_ver.txt --------------------------------------------------------- BSL Scripter 3.1.0.0 PC software for BSL programming 2016-Jun-03 12:21:16 --------------------------------------------------------- Input file script is : D:/MSPBSL_Scripter_win/BSL_Scripter_Windows/ScriptExample /P4xx_uart/script_P4xx_uart_ver.txt // //Script example MSP432 UART BSL //Software : BSL Scripter 3.1.0.0 //Device : MSP432P401R //Comm Bridge: XDS110 - MSP432LP BackChannelUART // for this setting, the parity need to be // set from Scripter side // When MSP-BSL Rocket is used, parity will be // generated by the Rocket // //Download blink application to //MSP432 device through UART BSL // //LOG MODE P4xx UART 9600 COM44 PARITY Initialization of BSL P432 succeed... RX_PASSWORD_32 pass256_wrong.txt Read Txt File : D:/MSPBSL_Scripter_win/BSL_Scripter_Windows/ScriptExample/P4xx_uart/pass256_wrong.txt Password is incorrect. RX_PASSWORD_32 pass256_default.txt Read Txt File : D:/MSPBSL_Scripter_win/BSL_Scripter_Windows/ScriptExample/P4xx_uart/pass256_default.txt Password is correct. MASS_ERASE Mass erase done. RX_DATA_BLOCK_32 BlinkLED_MSP432P401R.txt Read Txt File : D:/MSPBSL_Scripter_win/BSL_Scripter_Windows/ScriptExample/P4xx_uart/BlinkLED_MSP432P401R.txt Time elapsed of writing 4391 bytes : 5.421 seconds Speed of writing data :0.791(kB/s) Data received by BSL. TX_BSL_VERSION_32 BSL Version is : BSL_Vendor[e01],CI[200],API[300],PI[201],Build_ID[300] REBOOT_RESET D:\MSPBSL_Scripter_win\BSL_Scripter_Windows\ScriptExample\P4xx_uart>
Jim Patten said:That said, I'm following the code example of AppNote SLAA659 and notice when I pass in COMMAND_BSL_CONFIG (0x00020000), the code (result = BOOT_OVERIDE_OPERATION_FAIL) returns failure:
The reason is because the ROM boot code is not being called, so you will need a different class of reset (POR/Reboot - please take a look at the RSTCTL chapter in the Technical Reference Manual). So please change your code to:
#include <msp.h> #include "flashmailbox.h" #include "driverlib.h" volatile bool forceReboot = false; int main(void) { volatile uint32_t i; WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer P1DIR |= BIT0; if(CheckAndEraseFlashMailbox(COMMAND_BSL_CONFIG) != BOOT_OVERRIDE_AND_MAILBOX_ERASE_OPERATIONS_SUCCESS) { while(1) { for(i = 0; i < 10000; i++); P1OUT ^= BIT0; if (forceReboot) { MAP_SysCtl_rebootDevice(); } } } else { P1OUT |= BIT0; } while(1); }
"MAP_SysCtl_rebootDevice" should perform a reboot and the ROM boot code will be called.
Jim Patten said:This is what I assume: 1.) The H/W invocation of getting into the BSL from toggling RST/Port_X.X is not available (like on the other MSP430 micro's) because the BOM comes from the Factory erased and needs to be JTAG'ed with code to put in (stating the BSL_PARAMS to act upon).
Yes this is correct, but by default if the memory is erased, the BSL will get called.
Jim Patten said:I still cannot BSL the via P1.5 on the Launchpad (0x7C48DF50).
1. Please make sure that you are using the PARITY on the MODE
2. Try again after you erased the application flash
3. Confirm that the BSL has not been erased, read location 0x00202000
4. Confirm that your Mailbox has the correct start address and it also enables the BSL
/*-------BSL Configuration Group-------------------------*/ /* BSL Enable * 0xFFFFFFFF: Disable * 0x00000000: Enable */ // 0xFFFFFFFF, 0x00000000, /* BSL Starting address, default pointing to TI BSL at 0x00202000 */ // 0xFFFFFFFF, 0x00202000, /* BSL Parameter * Use HW Invoke on Port 1, Pin 5, on HIGH * Use UART */ BSL_CONFIG_HW_INVOKE_PORT1 | BSL_CONFIG_HW_INVOKE_PIN5 | BSL_CONFIG_HW_INVOKE | BSL_CONFIG_HW_INVOKE_PIN_HIGH | BSL_CONFIG_INTERFACE_UART,
Jim Patten said:I also cannot see the data at address 0x00200000 using IAR
Please add the compiler directives __root const (in msp432_flashmailbox.c)
#elif defined (__ICCARM__) /* IAR Compiler */ __root const uint32_t FlashMailBox [] @ 0x00200000 =
Hopefully this helps.
David
Hi David,
You gave me advice on how to see the ACK (0xACE) from the sample program on using the Boot Override Mailbox. I still cannot get the Ack even with putting in the MAP_SysCtl_rebootDevice() routine as explained in the above post.
I never get the ack and the code stops at __exit: in the Disassembly window. Any ideas as to why
This is my code from main():
volatile bool forceReboot = false; int main(void) { volatile uint32_t i; WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer P1DIR |= BIT0; if(CheckAndEraseFlashMailbox(COMMAND_BSL_CONFIG) != BOOT_OVERRIDE_AND_MAILBOX_ERASE_OPERATIONS_SUCCESS) { while(1) { for(i = 0; i < 10000; i++); P1OUT ^= BIT0; if (!forceReboot) { forceReboot = 1; MAP_SysCtl_rebootDevice(); } } } else { P1OUT |= BIT0; } while(1) return(0); }
Code never returns ACK:
uint32_t CheckAndEraseFlashMailbox(uint32_t flashMailboxCommand) { uint32_t result = BOOT_OVERRIDE_AND_MAILBOX_ERASE_OPERATIONS_SUCCESS; uint32_t eraseCycles = 0, eraseSuccess; /* Only check for commands different from COMMAND_NONE */ if(flashMailboxCommand != COMMAND_NONE) { if(flashMailboxCommand & COMMAND_FACTORY_RESET) { if(*((uint32_t*)(ACK_FACTORY_RESET)) != 0xACE) { result = BOOT_OVERRIDE_OPERATION_FAIL; } } //NOTE: Code never returns ACK!!! if(flashMailboxCommand & COMMAND_BSL_CONFIG) { if(*((uint32_t*)(ACK_BSL_CONFIG)) != 0xACE) { result = BOOT_OVERRIDE_OPERATION_FAIL; } else { __NOP(); } }
As a follow-on question. I'm looking at Section 4.7.5.2.2 Boot Override Commands and Acknowledgements in the User's Guide SLAU356A. There's an example I've pasted from page 266. These examples give the reader just enough info to get confused. I see that one could manually set up the flash BOM
__root const uint32_t FlashMailBox [] @ 0x00200000 =...
But how does the User initiate a reboot int the system to see the 0xACE acknowledgement AND can this be done under IAR EW emulation so I can see the ACK at the
correct address in the BOM?
Hi Thomas!
How are you? Quite a long time has passed already since we met in Freising.
So the MSP-FET can be used in 4-wire JTAG mode to debug the MSP432P401R or only BSL programming?
Dennis
Hi Dennis,
the MSP debuggers user guide rev D update is out www.ti.com/lit/pdf/slau647
An adapter to connect to the MSP432 target socket board is available here http://www.ti.com/tool/MSP-FET-432ADPTR
Tom
Thanks for the update! Now only the MSP432 has to reach production level. But the new LaunchPad is only already, so hopefully this won't take too long now. Dung said, Rev. C silicon availability is planned for end of the month, so I will have to get one of those adapters!
The link does not work - but the revised version seems to be here.
Dennis
**Attention** This is a public forum