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.
Using the code below I load, run in debug mode in CCS-8. I run the scripter. I get numerous NACK returns and upon power cycle the MSP430FR2355 runs the code previously loaded, not the new code loaded thru the BSL scripter.
Code:
#include <msp430.h>
int main(void)
{
//**************************************************************************************
// Clock Configuration
//**************************************************************************************
// Stop Watch Dog Timer
WDTCTL = WDTPW | WDTHOLD;
// Configure one FRAM wait state as required by the device data sheet for MCLK
// operation beyond 8MHz _before_ configuring the clock system.
FRCTL0 = FRCTLPW | NWAITS_1;
__bis_SR_register(SCG0); // disable FLL
CSCTL1 = DCORSEL_3;// DCO Range = 8MHz
CSCTL2 = FLLD_0 + 243; // DCOCLKDIV = 8MHz
__delay_cycles(3);
__bic_SR_register(SCG0); // enable FLL
// Disable the GPIO power-on default high-impedance mode to activate
// previously configured port settings
PM5CTL0 &= ~LOCKLPM5;
__disable_interrupt();
((void (*)() )0x1000)();
}
Just to clarify, Don, BSL-Scripter depends upon the hardware interface to generate both the hardware invocation pattern on /Reset and Test and the 8/E/1 format the chip is expecting. (By default, Scripter uses 8/N/1, but will switch to 8/E/1 if the PARITY switch is used on the MODE line.) So far as I know, the interfaces which do all that are the MSP-FET, the Rocket, and the kludge described in SLAA535a.pdf (which I have tested, and it works).
If you aren't using one of those, then you can still use BSL scripter, but:
1. If you want to use hardare invocation, you'll have to come up with some other way to generate the pattern. But if you invoke via software from your firmware that's not an issue.
2. You'll have to use the PARITY switch.
I thought back in the beginning you were trying to invoke BSL from your firmware, but may have you confused with someone else. Anyway, no matter how you invoke, the PARITY switch is something you'll have to consider if you aren't using an approved hardware interface.
And I guess I should also say that you can use a generic USB-to-serial adapter as the hardware interface, but will have to jump through some hoops, as described in my Github repo on this subject:
https://github.com/gbhug5a/CP2102-with-BSL-Scripter-for-MSP430
I've turned this over to Wes to figure out why our configuration acts differently. I'm suspecting it is that parity thing. Please leave it open a couple more days in case he needs something. Thanks!
I successfully ran the BSL with the script and our hardware system (USB (Virtual COM Port) to RS232 Converter to CMOS 3.3V Logic).
MODE FRXX UART 9600 COM188 PARITY
MASS_ERASE
DELAY 200
RX_PASSWORD pass32_default.txt
RX_DATA_BLOCK your_program.txt
However, when I change the 16MHz system clock to 8MHz before invoking the BSL in the application code it does not work. I am still working on this issue.
Also, I should note that when I use the UART (virtual COM port) on the MSP430FR2355 Launchpad it does not seem to accept parity changes from a Terminal Program like (HyperTerminal, Brays or TeraTerm), so it does not work on the Launchpad with the USB to UART converter on-board. This is not an issue but was not expected.
Excellent! I'm very happy you were able to get it working! Also thank you, George, for helping out with this issue as well.
One final note I'd like to make - you are going to want to double check that any peripherals that the FR2355 BSL uses (clock system, eUSCI_A, and TIMER_B) are cleared out before you invoke the BSL. Everything seems to be working, but I wanted to mention this in case your application code touches any of these peripherals before a BSL invocation is attempted. Please see below:
This means you are going to want to make sure the following conditions are met before SW BSL invocation:
1. The clock is at or below 8MHz (which you are doing)
2. eUSCI_A registers are cleared
3. TIMER_B registers are cleared
Since you "set the clock to 1MHz without changing the UART settings..." conditions 1 is met. Please double check that the eUSCI_A registers and TIMER_B registers are cleared.
UART must also be configured at 9600 baud before BSL invocation. You are already doing this, but I wanted to highlight this in my post for completeness:
Thanks and congrats!
-Mitch
**Attention** This is a public forum