Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MSP430F5438 bootloader using SerialPort

Status
Not open for further replies.

sunil880089

Full Member level 2
Joined
Aug 24, 2011
Messages
125
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Activity points
2,031
Hi every one,

I am new to BSL programming.
I don't know how to write BSL code and
Which is the software used to download BSL code to the MSP430F5438.

Please help me.

Regards
Sunil
 

Dear Sir,

Thank you,
But i am facing problem to write the BSL code for the MSP430F5438.
which is the software used to download the Code through BSL..

Please help me.

Regards
Sunil
 

But i am facing problem to write the BSL code for the MSP430F5438.

I think that the original BSL already supports Serial Downloading...

which is the software used to download the Code through BSL..
The software you can use to download the code trought BSL is BSL_Scripter, and you can download it from here:

You can download it from: **broken link removed**

it is the .exe file located in that zip folder under BSL_Files/BSL Scripter, where you have a user manual...

you also have demo examples of scripts for code downloading... just copy the executable to the demo folders, and run it from there...

I will post here some sample scripts from that file:

Download App code:
MODE 5xx COM1
MASS_ERASE
RX_PASSWORD
RX_DATA_BLOCK Big_File.txt
CRC 5C00 1000 982B


Download App code and verify:
MODE 543x_family COM1
MASS_ERASE
RX_PASSWORD
RX_DATA_BLOCK Big_File.txt
CRC 5C00 1000 982B
 
Dear Sir Thank you... i will follow your suggestions.

After downloading the BSL code to the MSP430F5438 using JTAG,

then how to download my application code to the MSP430F5438 using BSL(Serial port),for this which flash software i have to use...

Please help me.

Regards
Sunil

---------- Post added at 17:18 ---------- Previous post was at 17:05 ----------

Dear Sir Thank you... i will follow your suggestions.

After downloading the BSL code to the MSP430F5438 using JTAG,

then how to download my application code to the MSP430F5438 using BSL(Serial port),for this which flash software i have to use...

Please help me.

Regards
Sunil

---------- Post added at 17:26 ---------- Previous post was at 17:18 ----------

I think that the original BSL already supports Serial Downloading...


The software you can use to download the code trought BSL is BSL_Scripter, and you can download it from here:



it is the .exe file located in that zip folder under BSL_Files/BSL Scripter, where you have a user manual...

you also have demo examples of scripts for code downloading... just copy the executable to the demo folders, and run it from there...

I will post here some sample scripts from that file:

Download App code:



Download App code and verify:



Dear Sir,
when i double click on" BSL_Scripter.exe", black screen will come and disappear...

can you tel me the solution for this...


Sir i am not understanding the following codes..

Download App code:

MODE 5xx COM1
MASS_ERASE
RX_PASSWORD
RX_DATA_BLOCK Big_File.txt
CRC 5C00 1000 982B

Download App code and verify:

MODE 543x_family COM1
MASS_ERASE
RX_PASSWORD
RX_DATA_BLOCK Big_File.txt
CRC 5C00 1000 982B

please help me.
 

when i double click on" BSL_Scripter.exe", black screen will come and disappear...

You need to run it from command prompt
Under windows press "Alt+R", and in the run dialog, write cmd (if in windows xp or above)
Now navigate with DOS commands to folder where you have the BSL_SCripter stored... Execute it from there by typing

- BSL_Scripter myScript.txt

and press enter...
("myScript.txt" the name of the fille containing the script that will be interpreted)

.. the code need to in .txt format TI-TXT
for generating the compiled .txt ROM you can use code composer studio..
How to Generate Binary-Format Files (TI-TXT and INTEL-HEX)
The CCS installation includes the hex430.exe conversion tool. It can be configured to generate output
objects in TI-TXT format for use with the MSP-GANG430 and MSP-PRGS430 programmers, as well as
INTEL-HEX format files for TI factory device programming. The tool can be used either standalone in a
command line (located in <Installation Root>\ccsv5\ccs_base\tools\compiler\msp430\bin) or directly within
CCS. In the latter case, a post-build step can be configured to generate the file automatically after every
build by selecting predefined formats such as TI-TXT and INTEL-HEX in the "Apply Predefined Step"
pull-down menu (Project → Properties → Build → Build Steps Tab → Post-Build Step → Apply Predefined
Step). The generated file is stored in the <Workspace>\<Project>\Debug\ directory.

For more info check the user manual **broken link removed**

Check the manual given with BSL_Scripter for the understanding of the scripting commands and parameters...

but basically :

MODE 543x_family COM1
MODE {FAMILY}{COM}

Command MODE Initializes the selected communication channel for a BSL session and
invokes the BSL (if required). This command also tells the PC side
engine which communication protocol should be used, according to the
FAMILY parameter.

MASS_ERASE
MASS_ERASE command Causes the BSL to perform a Mass Erase

RX_PASSWORD
RX_PASSWORD {FILENAME}
Causes the BSL to read the supplied TI TXT file and submit this data to
the BSL as a password to unlock the device

FILENAME [optional] The name of the TI TXT file to read. If not
supplied, the default password will be used.

RX_DATA_BLOCK Big_File.txt
RX_DATA_BLOCK {FILENAME}
Causes the BSL to read the supplied TI TXT file and download all data
contained in this file to the MSP430
FILENAME [Required] The name of the TI TXT (witch is the actual ROM) file to read

CRC 5C00 1000 982B
CRC_CHECK {ADDR}{LENGTH}{EXPECTED}
Performs a CRC check starting at the given Address over length number
of bytes. This command will simply output the result of the CRC
operation, or compare the result to a supplied value and report whether
there is a match or not

ADDR [Required] The Address at which to begin the CRC
LENGTH [Required] The number of bytes to include in the CRC
EXPECTED [Optional] The value to compare with the CRC result


As you can see everything is more clear when have a look at the manual ..
 
Dear Sir Thank you...

i will follow your suggestions.

Regards
Sunil

---------- Post added at 11:57 ---------- Previous post was at 11:49 ----------

Dear Sir...
Thank you so much ...i ll Follow your Suggestions.

I have one doubt that... Before Downloading the Application program to the MSP430F5438 using BSL,
i have to download the BSL code to the MSP430F5438 using JTAG,so that on RESET it has to go to BSL code.

is it right?

if so, then which code i have write for MSP430F5438 to download through JTAG.
i am not getting any Example code to download From JTAG..

please help me.


Regards
Sunil
 

Dear sir,

I am following your suggestions,

when i type -" BSL_Scripter myScript.txt" in command line.. i face the following problem...

please see the image below..
**broken link removed****broken link removed**


Please help me to find the solution.

Regards
Sunil
 

There is some kind of problem with your images.. I not able to see them... please re-upload the images...

Also, post the script that you are using, as well as the real name of the files you are using...,

Keep in mind that you will have to have in the same folder: the following files:

myScript.txt (witch is a script written by you in order to configure BSL_Scripter.exe to download the code)
myRom.txt (witch is your application ROM in the TI-TXT format, and that is correctly referenced on the myScript.txt)
BSL_Scripter.exe (the application that will download the code)

---------- Post added 28-04-12 at 00:27 ---------- Previous post was 27-04-12 at 23:32 ----------

I am new to BSL programming.
I don't know how to write BSL code and
Which is the software used to download BSL code to the MSP430F5438.

Any way, I just understand that I haven't answer you question properly... If you want a BSL that enables you to download TI-TXT app by serial or USB you can use the original TI-TXT BSL that comes with the chip, and use the BSL_Scripter (witch source code is available)

If you want to download custom BSL into the MSP430F5438 , you can Use IAR or CodeComposerStudio, etc...
Be aware that there is a bug in some MSP430F5438... only Rev -A will support custom BSL...

Gentlemen,

I would like to discourage you from trying to load custom code into the BSL memory space of current MSP430F543x (non-A) devices. The reason is that the current devices have a bug (SYS4, see the device errata sheet under **broken link removed**) for which there is basically no workaround. Therefore, programming a custom BSL is not supported. Future device revisions will have this bug fixed and will allow for BSL customization. If a custom bootloader is desired, it needs to be implemented using the device's main Flash memory.

Regards,
Andreas

Please check this tread http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/19663.aspx
 
Last edited:
Dear sir,

sorry for the inconvenience.

when i type -" BSL_Scripter script.txt" in command line.. i face the following problem...

please see the image below..

1.jpg


2.jpg

the BSL_Scripter.exe is under the following folder..
C:\BSL Scripter\BSL_Scripter.exe


the script file is under the following folder...
C:\BSL Scripter\Demo Scripts\5438_Application_Download_and_Verify\script.txt

this file contains the following code...
MODE 543x_family COM1
MASS_ERASE
RX_PASSWORD
RX_DATA_BLOCK Big_File.txt
CRC 5C00 1000 982B


the Big_File.txt is under the following folder...
C:\BSL Scripter\Demo Scripts\5438_Application_Download_and_Verify\Big_File.txt
this file contains the code,,,


Please help me to find the solution.

Regards
Sunil
 

Dear sir,

as for your suggestion i am not going for Custom BSL.

I have BSL programmer which is connected to the MSP430F5438.

but i don't know how to download the code to the MSP430F5438.

thanks and Regards
Sunil

---------- Post added at 10:17 ---------- Previous post was at 10:14 ----------

Dear sir,
i am not understanding the meaning of following Sentence,
i am not getting the original TI-TXT BSL that comes with the chip...
If you want a BSL that enables you to download TI-TXT app by serial or USB you can use the original TI-TXT BSL that comes with the chip, and use the BSL_Scripter (witch source code is available)
 

Well, seems that the problem is that the BSL_Scripter is not finding the files you point
..

copy:
  • script.txt
  • Big_File.txt
to C:\BSL Scripter\

then you will have
  • C:\BSL Scripter\BSL_Scripter.exe
  • C:\BSL Scripter\script.txt
  • C:\BSL Scripter\Big_File.txt

______
also, If you have an Rev-A of MSP430F5438, that script.txt that you are using won't work because of line
MODE 543x_family COM1

also, this script will be using COM1... Is this where you have the uC connected?

---------- Post added at 05:51 ---------- Previous post was at 05:47 ----------

i am not understanding the meaning of following Sentence,
i am not getting the original TI-TXT BSL that comes with the chip...

I mean that with TI-TXT BSL, to say Original TI flash BSL that comes with the chip who supports SERIAL download off TI-TXT formatted roms
 
Dear sir,
i am getting confuse,,,

i don't know how to write BSL code and Application code for MSP430F5438.
i want to write a application code only to blink the LED..and i want to download this code using BSL.

i have the code file which contains the following code...
the file name is LEDTEST.txt

@5c00
31 40 00 5C 00 18 F2 40 4A 5C 00 1C 00 18 F2 40
4A 5C 04 1C B0 13 42 5C 0C 43 B0 13 22 5C B0 13
46 5C B2 40 80 5A 5C 01 D2 D3 05 02 02 3C D2 C3
03 02 F2 B0 80 FF 01 02 FA 27 D2 D3 03 02 F9 3F
03 43 1C 43 10 01 03 43 FF 3F 10 01
@fffe
00 5C
q


how to download this code to MSP430 using BSL.
please help me.

thanks and Regards
Sunil

---------- Post added at 10:31 ---------- Previous post was at 10:24 ----------

Well, seems that the problem is that the BSL_Scripter is not finding the files you point
..

copy:
  • script.txt
  • Big_File.txt
to C:\BSL Scripter\

then you will have
  • C:\BSL Scripter\BSL_Scripter.exe
  • C:\BSL Scripter\script.txt
  • C:\BSL Scripter\Big_File.txt

______
also, If you have an Rev-A of MSP430F5438, that script.txt that you are using won't work because of line
MODE 543x_family COM1

also, this script will be using COM1... Is this where you have the uC connected?

Dear Sir,

i am using MSP430F5438 ,how to find Rev A?

I am using COM1.which is connected to BSL programmer.

my doubt is before downloading this code using BSL programmer
is there any Code i have to download to MSP430 using JTAG ?


Please help me

Regards
Sunil
 

my doubt is before downloading this code using BSL programmer
is there any Code i have to download to MSP430 using JTAG ?
No, unless you have erased the original BSL


i am using MSP430F5438 ,how to find Rev A?
can be done by reading the model written on the chip.. If is Rev-A you will find MSP430F5438A


To download the code just do what I suggested above :)
 
Well, seems that the problem is that the BSL_Scripter is not finding the files you point
..

copy:
  • script.txt
  • Big_File.txt
to C:\BSL Scripter\

then you will have
  • C:\BSL Scripter\BSL_Scripter.exe
  • C:\BSL Scripter\script.txt
  • C:\BSL Scripter\Big_File.txt

______
also, If you have an Rev-A of MSP430F5438, that script.txt that you are using won't work because of line
MODE 543x_family COM1

also, this script will be using COM1... Is this where you have the uC connected?

---------- Post added at 05:51 ---------- Previous post was at 05:47 ----------



I mean that with TI-TXT BSL, to say Original TI flash BSL that comes with the chip who supports SERIAL download off TI-TXT formatted roms

Dear sir,

i copied

script.txt
Big_File.txt

files to the same folder ,
i.e
C:\BSL Scripter\BSL_Scripter.exe
C:\BSL Scripter\script.txt
C:\BSL Scripter\Big_File.txt

Now it showing Following Error..

please see the image below.

**broken link removed**

thanks and Regards
Sunil

---------- Post added at 10:57 ---------- Previous post was at 10:56 ----------

No, unless you have erased the original BSL



can be done by reading the model written on the chip.. If is Rev-A you will find MSP430F5438A


To download the code just do what I suggested above :)

Dear Sir,

thank you.. i will download the code as you suggested...

thanks and Regards
Sunil
 

You are having trouble with the images.. I not able too see them

please see the image below.

Attachment 73305
 
Last edited:

You are having trouble with the images.. I not able too see them

Dear sir,

sorry for the inconvenience.


please see the image below.3.jpg
thanks and Regards
Sunil
 

In Order to reply you questions,

To enter BSL mode, communication hardware must allow access to TEST, RESET, P1.1 and P1.2. .. The BSL Entry Sequence can not be done by manually pressing reset and test..

The converted Serial: DTR, RTS, RXD, and TXD are connected to the F5438: RST, TEST, BSL-TXD and BSL-RXD respectively.

The UART protocol applied here is defined as:
• Baud rate is fixed to 9600 baud in half-duplex mode (one sender at a time).
• Start bit, 8 data bits (LSB first), an even parity bit, 1 stop bit.

The signal of DTR, RTS, must be logically inverted on the RS232 levels either by software or hardware...

Check chapter 4 and 6 of **broken link removed** for more info and for reference design hardware connection for BSL usage

_____
You should have no problem with revision L
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top