Jump to content
43oh

MSP430F5529 USB Launchpad printf


Recommended Posts

OK, so my Launchpad came in and I finally had some time ot start playing with it and learning the 430.  I've been mucking with the example codes to try and get my feet wet, but I am having no luck with the hello.c hello world application.

 

How is that supposed to work?  I figured it is using printf() to send the string out the USB port, so I setup a serial terminal to look at the port at 9600, 57600, and 115200 baud and didn't see anything coming out?  Is there something I am missing for what I need to do here?  I am using CCS as my IDE.

 

Thanks!

Link to post
Share on other sites

printf with CCS is explained here:

http://processors.wiki.ti.com/index.php/Printf_support_for_MSP430_CCSTUDIO_compiler

Note that printf and serial communication stack will use a fair amount of memory, so this will only work with the larger MSP430 chips (F5529 should be fine, G2533 won't work without resorting to custom I/O libraries).

 

If that looks overly complex, you should consider starting with Energia, where printf("hello world!") is more straight forward.

 

PS: In case you stick with CCS, this thread will be of great help to get printf working on smaller devices http://forum.43oh.com/topic/1289-tiny-printf-c-version

Link to post
Share on other sites

Well, maybe I should rephrase my question.  If I wanted to do something SUPER simple to get started (like poll the ADC, and send the value to the terminal), how would you recommend I get started (this test would allow me to test things, get used to the 430, and have a way to print debug)?

Link to post
Share on other sites

Well, maybe I should rephrase my question.  If I wanted to do something SUPER simple to get started (like poll the ADC, and send the value to the terminal), how would you recommend I get started (this test would allow me to test things, get used to the 430, and have a way to print debug)?

What i do is I go to the chip's page and open up the code samples, generally there's one for every peripheral use case. Take bits from that and adapt it to your uses. If you need to customize them check the family's datasheet.

Link to post
Share on other sites

OK, I think I found what I was looking for.  There is the USB backchannel project that TI supplies for the CC IDE. I built it and it allows you to echo transfers characters from the USB back-channel to the MSP USB-serial channel and vice versa.  I should be able to take that and rework it for what I needed.

Link to post
Share on other sites
  • 1 month later...

Not sure if you still need the help, but it's probably easier if you use UART instead. The 5529 LP has a UART COM port interface when plugged in with USB so you can use that to listen to, at baud rate up to 115200 (maximum I've used). You can use oPossum's printf function: http://forum.43oh.com/topic/1289-tiny-printf-c-version/

 

Attached is a class that allows you to use oPossum's function. All I did was adding appropriate registers that 5529 uses.

 

You can also install RXTX terminal plugin for Eclipse if you want a more compact feel. http://processors.wiki.ti.com/index.php/How_to_install_the_terminal_plugin_in_CCSv5

 

Printf.hPrintf.c

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...