Other Parts Discussed in Thread: UNIFLASH, MSP-FET, MSP430F2619, MSP430FR59941
Hello, I have been trying to communicate with the BSL Bootloader in MSP430FR50431 with a very limited success.
I have written a very simple program that enters the BSL and does nothing else before.
#include <msp430.h>
/**
* main.c
*/
int main(void)
{
//WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
__disable_interrupt(); // disable interrupts
((void (*)())0x1000)(); // jump to BSL
return 0;
}
I am able to send the "Check BSL Version" command to the device and the response I get indicates that I have yet to provide the correct password - I get the 0x00 ACK byte, 0x80 header, 0x02 length,
0x3B 0x04 cmd and message and a checksum.
According to the "MSP430 FRAM Devices Bootloader" document (as seen on www.ti.com/.../slau550z.pdf , this means that i need to send the password first.
After I send the (blank) password (that is, FF FF FF FF ....as described in the document on page 18) , the response when I query the version remains unchanged. This is to be expected, since the password was incorrect - the fram should now get erased automatically, as described in the document above.
Once I send the the blank password once again, I would expect the device to be unlocked and thus to obtain the current version of the BSL next time I ask.
Instead, the device freezes, pulling SCL low indefinitely after I send the address byte (ADDR+R).
If I supply a non-blank password instead, I can ask for the current BSL version again and the response is the same as before.
In summary, these are the responses of the device to my commands:
>>BSL Version?
<<Not unlocked!
>>Empty password!
>>BSL Version?
<<Not unlocked!
>>Empty password!
>>BSL Version?
<<(DIES)
Or alternatively
>>BSL Version?
<<Not unlocked!
>>Empty password!
>>BSL Version?
<<Not unlocked!
>>Wrong password!
>>BSL Version?
<<Not unlocked!
This leads me to believe that the problem happens once I have tried to unlock the device. I have tried using the MSP BSL Scripter tool with MSP430 Fet, but it turns out that it doesn't support I2C for some reason. The Uniflash tool doesn't seem to support this processor with I2C bootloader, either.
I have double checked the correctness of my communication using a logic analyzer and the packets I am sending are identical to those described in the document I was reffering to earlier. The only difference is that in the document, the LSB of the length on page 18 is 0x33, but I believe that to be a mistake, as the correct value is 33(decimal), which is 0x21 hex; the Uart example above uses the value 0x21. With 0x33, the checksum is incorrect, anyway.
I have googled the problem and found this:
https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/519983?BSL-Unlock-Problem-FR59691
So I have disabled the MPU in the project settings, but it didn't help.
Thank you for your support. - David!