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.

MSP430F5438, MSP-FETU430IF JTAG Mailbox data exchange

Other Parts Discussed in Thread: MSP430F5438, MSP-FET

I would like to exchange data from/to the MSP430F5438 using the JTAG mailbox system.

I found informations in the "MSP430x5xx family User's guide", I think that my code for the MSP430F5438 should work.

But I can't find any documentation on how to read/write the JTAG mailbox using the MSP-FETU430IF.

Does somebody knows how should I do it ?

Thank you in advance.

  • jm,

    for this feature to be useful, it needs to be supported by the development tool you are using. However such support is not available/exposed through our current tools. Are you trying to establish a higher-speed connection to your MSP430 to stream some test data? If so, I would probably recommend using a high-speed (e.g., 480,600 Baud) UART connection through an external USB-to-UART converter since this won't cause too much overhead in your application. The easiest for this would be to use an off-the-shelf MSP-EXP430F5438 experimenter's board since it has this high-speed USB-to-UART bridge on it.

    Regards,
    Andreas

  • Andreas,

    I already have a MSP-EXP430F5438 board.

    I would like to use the JTAG mailbox feature to send debugging data. My product needs to be re-programmable by the field engineers, I was thinking that I could use the JTAG connector for both debugging and re-programming.

    Does the IAR development tool support the JTAG mailbox ?

    Or is it possible know the protocol used by the MSP-FETU430IF to send mailbox exchange JTAG commands ? I don't need it to be integrated to an IDE, if I can make a simple text mode program, it is enough.

    Regards,
    Jean-Marc

  • Jean-Marc,

    the current IAR tool doesn't support the JTAG mailboxing scheme. Actually, as far as I know this support isn't exposed yet through the current version of the underlying MSP430.DLL driver module.

    Regarding the specific problem you are trying to solve, what would prevent you from using "regular" JTAG (basically, all functionality that is readily available and exposed through the tools) for debugging and re-programming? Is it real-time requirements? Is it because it's a large amount of data? Something else? Just trying to better understand what you wanting to accomplish.

    For example if you are wanting to log "life" application data you could use an area in RAM as a buffer for data exchange, and stop your application at suitable times to read/write data from/into this buffer. You could even automate this using debug server scripting. Or you could use standard CIO to directly access the debugger's terminal window, or your PC's file system. However this operation is very expensive in terms of memory/cycles used and may not be suitable for what you are trying to do.

    Regards,
    Andreas

  • Hi Andreas,

    I'm also pretty eager to see the JTAG mailbox working, and I'm sure there are many forum readers who are eager as well. I was very excited when I heard about it in your lecture at ATC last year. For a long time I've been using a spare UART port with custom made PC apps to debug in real time. This is an ok solution, but it requires either extra hardware on the prototype, or, as is sometimes required, jumpers to a board that does have the level translator and hijack it.

    I'm currently working on a project with a 5529.

    Can you believe it? I'm using every UART port on it! And unfortunately most of the pins are spoken for, so a bit  bang UART would be difficult.

    A clean JTAG solution would have been ideal for debug in this case (as well as for many of the smaller low end msp430s)! :)

    Thanks

    darkwzrd

  • Hi darkwzrd,

    darkwzrd said:
    I'm also pretty eager to see the JTAG mailbox working, and I'm sure there are many forum readers who are eager as well.

    same here, so please make this a +1[:D]

    But seriously yes I can feel your pain, and making use of this feature is definitely on our radar screen (otherwise why spending effort putting it in the first place?). But the reality is that it's just one of many things our tools folks need to take care of, and on top of that it's something rather non-trivial affecting the entire debug chain (MSP-FET430UIF firmware, MSP430.DLL driver libraries, plus the entire IDE infrastructure). Will go check with our tools folks to see what's on the roadmap regarding this.

    Thanks and Regards,
    Andreas

  • Andreas,

    Looking at the datasheet, JTAG mailbox seems to be the easiest way to exchange data between the microcontroller and a PC.

    The User's guide says :
    "Applications of the JMB are:
    · Providing entry password for device lock/unlock protection
    · Run-time data exchange (RTDX)"

    But it seems that JMB feature is a non-feature...

    I need to log the internal state of the microcontroller (internal date and time, state of some RAM variable). Speed of the of connection is not an issue, I need around 100 byte per second.

    I can do what I want using a serial port (to read logging in the field without stopping the application) and the regular JTAG interface (for re-programming). So I need to give a MSP-FETU430IF and a custom TTL-to-RS232 serial cable to the field engineers. By using the JTAG mailbox, only the JTAG interface would have been required.

    Is there a way to read RAM using JTAG without stopping the application ?

    Regards,
    Jean-Marc

  • Jean-Marc,

    thanks for the background info, I agree some RTDX-type of comunication would be perfect for your case.

    jm l said:
    Is there a way to read RAM using JTAG without stopping the application ?

    There actually is a bit of crude way to obtain real-time information from your running application without affecting its real-time operation via the so called "State Storage" function that is built into our higher end devices such as the F5438. Think of it as a limited-capability trace function. It allows you to "log" any CPU activity (such as memory write accesses, register write operation, etc) into a small internal buffer that can be read out via JTAG without affecting the running application at all. However with the current tools support this function isn't suitable to continuously stream data from the device or to collect anything more complicated than the contents of a word-wide memory location. You can check out section Real Time Watch in our app note Advanced Debugging Using the Enhanced Emulation Module (SLAA263).

    Regards,
    Andreas

  • This thread hasn't been updated in awhile.

    Can you please let me know when the Code Composer tools (eclipse, MSP430.dll and MSP-FETU430IF) support the JTAG mailbox scheme for streaming data?

    Is there any examples of using the mailbox in a standalone operation without code composer?

    Just to elaborate a bit...

    Standalone operation would use the MSP430.dll with MSP-FETU430IF and my custom C/C++ application.

     

    Thanks,

    Dan

     

  • I don't think JMB is a way to stream data between MSP and a PC. Main reason is because writing data into JMB or reading it requires JTAG action. This always interferes with the code, influencing realtime-behaviour. If realtime is not a problem, the MSP will receive data properly. Sending data to the MSP, however requires pulling the data from the MSP registers through JTAG, again an interruption. And I don't know how the PC will 'know' that new data has arrived.

    It is easier to use an UART for debugging communication. Even with much data to be sent, it doesn't slow require much processor time and handles data rates up to 11kB/s nicely. with a little bit of additional programming, you can even multiplex the connector: simply connect the UART lines with the JTAG lines, let the TX line unselected until you got a proper debug request on the RX line. This way, you can attach both, JTAG or serial, with the same connector. (you'll need an RS232 level changer on the connecting cable/USB-to-RS232 converter so it will accept the TTL level signals, but that's simple)

  • Hi Gents,

     

    At first the JTAG mailbox is not assessable by  an API of the DLL or via CSS & IAR. There are planes to expose the functionality in the feature.  

     

    Streaming data with the JTAG mailbox is a really big thing, because it effects the real-time behavior of your system like mention in the post before.

     

    But another idea is to the JTAG mailbox as an asynchrony message communication system. Image: Your code running on the MSP. In the mode the JTAG tool and the DLL have no change to read out the actually sate of the device. If you MSP code is written in way, that it send “events” to the JTAG mailbox the JTAG could poll the mailbox for new events and evaluate them.

     

    Regards Florian

  •  

     

    Hi Andreas,

    I have a question related with this old thread. I'm interested in profiling a real execution program of a wireless sensor network node. I found that some derivatives of the newest MSP430 have a trace buffer to storage state information but I could not find out if it is possible to do what I want.

    Do you know if it is possible to get a real-time execution trace of a MSP430F5438 using an usb fet tool?

    Any suggestion is welcome.

    Regards,

    Leonardo

     

     

  • Hi all,

     

    are there any updates to this issue? Any plans to make the JMB featrure available via the MSP430.DLL, at least?

    Background: Want to print debug message out to the (NoICE-) console and currently, waste an UART for this...

  • Hi TI Employees,

    I am interested in the MSP-FET development tool and the physical implementation of the UART back-channel feature. Does this "back-channel UART" use JMB feature and therefore I can use the JTAG interface sending debug messages to the PC? (i.e. I don't need to dedicate a UART port for debug purposes)

    There is not much information on this new "Back-channel UART" feature. If there is any informative documentation I have missed please provide a link.

    Best Regards,

    Sean

  • Sean Connor said:

    Hi TI Employees,

    I am interested in the MSP-FET development tool and the physical implementation of the UART back-channel feature. Does this "back-channel UART" use JMB feature and therefore I can use the JTAG interface sending debug messages to the PC? (i.e. I don't need to dedicate a UART port for debug purposes)

    There is not much information on this new "Back-channel UART" feature. If there is any informative documentation I have missed please provide a link.

    Best Regards,

    Sean

    New MSP-FET is open software source / open hardware, so anything you want to know regarding MSP-FET can be found in source code or board schematic. Back-cannel UART is just MSP430F5xx /6xx USB-UART bridge implemented in software (like some examples included in TI USB stack). It is not related to JMB in anyway. 

  • The Back-channel (or Application) UART has nothing to do with JTAG or the JMB. And it isn’t new.

    Originally, it was a hack to use some unused computing power and port pins of the USB/SER bridge chip of the eZ-FET as a secondary software UART, so it could forward serial data up to 9600Bd from the MSP’s UART to the PC. This happened independently of the FET part.
    On the newer eZ-FETs built on an MSP with internal USB controller, this has been extended to above 9600Bd and supports RTS/CTS too. It still is just a transparent USB/serial bridge to a virtual COM port. In both cases, the target MSP has to actively read/write data through its UART module by firmware.

  • Hi,
    are there any updates to this issue?

    Background:
    I want to use the JTAG Mailbox (JMB) System to send commands to my own bootstrap loader (BSL).
    With this command the BSL should erase the entire FLASH and thereby reset the electronic JTAG fuse.

    We use the IAR / MSP-FET430UIF with a MSP430F5xx.

    Best Regards,
    Stefan
  • All FET's are using Mailbox (at least) during flashing 5xx/6xx target devices. However, AFAIK, there is no free user channel that can be used for communication with target device. I didn't check, but I am not sure that JTAG / SBW Mailbox communication is possible if JTAG fuse is blown.

    My flasher have 2 CDC-Mailbox bridges (or 2 CDC-Uart bridges).

    http://forum.43oh.com/topic/2972-sbw-msp430f550x-based-programmer/?p=54286

  • IIRC, the mailbox will still be accessible with a 'blown' fuse. Chapter 1.10.2 of the 5x family users guide states:
    "Some JTAG commands are still possible after the device is secured, including the BYPASS command and the JMB_EXCHANGE command which allows access to the JTAG Mailbox System"

    Since the JTAG fuse is a software fuse on 5x family, it is the boot code that grants the JTAG interface access to the CPU based on the 'fuse'. From the 5x family users guide description, I would say there also is a (yet undisclosed) way to enable JTAG by the application based on a verified password message in the mailbox. (even if not, the password message can still be used to make the application performing an 'unblow' operation on the JTAG fuse to unlock the device again.)

**Attention** This is a public forum