UART Tiva TM4C129 Code Composer MX Pro v7

General discussion on mikroElektronika development boards.
Post Reply
Author
Message
TheBlues
Posts: 9
Joined: 08 May 2015 02:05

UART Tiva TM4C129 Code Composer MX Pro v7

#1 Post by TheBlues » 25 May 2015 04:15

Hi All:

I am unable to communicate with UART A & UART B on the Easy MX Pro v7 Board.
Any help would be greatly appreciated.

I am using TI's Code Composer and am able to successfully debug the code running on the board.
Thus, communications from Code Composer to the Board is fine.

I configured UART 2 in Code Composer and enabled the PINS PD4 & PD5 for UART A.
I configured UART 7 in Code Composer and enabled the PINS PC4 & PC5 for UART B.

On the MX Pro v7 board:
SW-5 1,2,3,4 are set to the ON Position.
SW-12 1-8 are set to the OFF Position. (Although I have toggled 3 & 4 just to see what happens.)

I am using an 'internet' USB Serial Terminal program.
I have used the program quite successfully with MicroChip and other TI processors.
When I hit a key on the keyboard, I see the RX LED flash on the MX Pro board on each UART.
I have to move the cable; but, each RX LED does lights up.
Thus, it 'seems' that the program, driver and connection that I am using may be OK.

I would expect to see the TX LED light for both UARTS constantly flashing.
They are not.
Connected to the USB cable to not.
The program is set up to constantly output "Hello, World".
Thus, I 'think' TX should constantly flash.

In checking the Returns from UART_open() and UART_write(), there are no invalid return codes.
Needless to say, I am using TIRTOS along with the TI UART drivers.

The board is being powered by the USB cable.
The program was compiled/liked using TM4C129XNCZAD settings.

As another test, I used the actual PORT PINS on the MX Pro to see what would happen.
I made changes to SW-5 and SW-12 as needed.
I connected them to a TTL 'chip'... as I have with other chips.
I stole the +5V from the Micro Bus power port... Same result. Nothing.

I have been using an older Tiva board quite successfully.
I have had very similar code running on the TM4C123X chips/boards.
I ran out of ports and needed more power.
So... I thought I would try the MX out.

I'm not seeing the problem.
Is there a switch on the board that I missed?
Is there a Code Composer system variable that I need to set for the MX Pro board?
Other?

Again, any thoughts would be greatly appreciated.

I'll be more than happy to post the code that I am using.

Thank you.

Rick

User avatar
darko.minic
Posts: 747
Joined: 01 Dec 2014 11:10

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#2 Post by darko.minic » 25 May 2015 13:21

Hi Rick,

Welcome to mikroE forum.

Unfortunately we don't use Code Composer.
I can recommend you to try USB UART examples from our compiler:
\Mikroelektronika\mikroC PRO for ARM\Examples\TI\Development Systems\EasyMx PRO v7 for TIVA Examples\USB UART A
\Mikroelektronika\mikroC PRO for ARM\Examples\TI\Development Systems\EasyMx PRO v7 for TIVA Examples\USB UART B

This simple examples demonstrates usage of UART on EasyMx Pro for Tiva through a "loopback" interface.
When you write some data Through UART it will be back to you.

Note that you should turn USB Uart switches on board(SW5.1. and SW5.2. for UART A and SW5.3. and SW5.4. for UART B).

Regards,
Darko

TheBlues
Posts: 9
Joined: 08 May 2015 02:05

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#3 Post by TheBlues » 25 May 2015 13:38

Hi Darko:

Thank you for your reply.

I'll order the TM4C129x board from TI and use it validate my code.
I will need the MX board for other purposes.

I'll get back with you in a few weeks! :-)

Rick

TheBlues
Posts: 9
Joined: 08 May 2015 02:05

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#4 Post by TheBlues » 20 Jun 2015 18:18

Hi Darko:

I ordered and received the TM4C1294XL board from TI. It has a TMC4129NCPDT chip installed.
I have no problems with this board using the proper compiler settings and a MAX232 TTL/UART converter chip.
It runs great. I used 3 UARTS at the same time with no issues. I was able to get this running within an hour.

The MX Pro Board chip that I am using is a TM4C129XNCZAD chip.
I re-wrote the same program and I used proper compiler settings.
SW.1 through SW.4 were set to the "ON" position.
I can get the RX lights to light when I hit the keyboard; but, the TX lights do nothing.
I can not get USB UART-A nor UART-B to work.

I turned SW.1 - SW.4 OFF and tried to use the Port C and Port D Pins directly with the MAX232.
The issue that I had here was that I could not find a 5V+ on the MX Pro Board to power the MAX232 chip.
I used the Miko Bus +5V; but this were only putting out 4.2V.
I'm not sure I had enough power for the MAX 232 chip.

I can download the CodeComposer program to the MX Pro board and debug it normally.
This works as desired.
I can not debug in to the TI UART drivers.
The returns from the driver calls (Open, Write, etc.) all appear to be fine.

The MX Pro hardware provides some very nice features that the TI LaunchPads do not.
However, I like the TI-RTOS CodeComposer environment.
I'm just not sure I like the idea of switching development environments in order to line up with the hardware manufacturer.

It seems like I should be able to use the Code Composer with the MX Pro Board.

Do you have any thoughts about next steps? Would you like to see the .out and .map files?

Thanks!

Rick

User avatar
Aleksandar.Mitrovic
mikroElektronika team
Posts: 1697
Joined: 11 Mar 2015 12:48

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#5 Post by Aleksandar.Mitrovic » 24 Jun 2015 11:06

Hi Rick,

Did you test your EasyMx PRO v7 board UART lines with some examples which we wrote?
http://www.mikroe.com/easymx-pro/tiva/

For example if you use multiple UARTS you will need UART_Set_Active function.

Unfortunately we are not familiar with Code Composer program which you are using.

You can post your code since the problem is related to the code and not to your hardware.

The voltage on mikroBUS should be +5V as well as on TFT connector +5V VCC.

Best regards,
Aleksandar

TheBlues
Posts: 9
Joined: 08 May 2015 02:05

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#6 Post by TheBlues » 28 Jun 2015 23:15

Hi Aleksandar:

Thank you for the tip on trying to use the example provided.

The Mikro example provided "appears" to be a .cproject or a TI Code Composer project.
I really do not understand how you can say that Mikro is not familiar with Code Composer.

From the .cproject files:
<cconfiguration id="com.ti.ccstudio.buildDefinitions.TMS470.Release.1615536388"> // CodeComposer 6.10 Example
<cconfiguration id="com.ti.ccstudio.buildDefinitions.TMS470.Release.135231643"> // EasyMXPro Example

The release versions are fairly different and the Mikro example appears to be very old.

The problem with the example is that the code provided does not compile when using updated Properties for the chip that I am using.

Do you have a compiled UART example, with my chip, that I can use for Testing?
The example can definitely be a Mikro compiled program.
I'll use the MikroProg utility to program the chip.
I just want to see the UARTS on the board running.

I do not have confidence that I can use the TI Development environment even though your marketing says that I can.

My options are:
A. Mikro tech support digs a little deeper to figure out what is going on.
I doubt that Mikro will do this since the answers provided thus far have been generic and basic.
B. I sell the Easy MX Pro Board on eBay and stay with generic TI hardware and software.
C. I rewrite all of my code using the Mikro compiler.

I am open to Option "C"; but, I want to talk to Sales directly about this. Can we take this out of the public forum to talk about this directly? You should have my email address.

I appreciate your consideration in this matter.

Thank you.

Rick

User avatar
Aleksandar.Mitrovic
mikroElektronika team
Posts: 1697
Joined: 11 Mar 2015 12:48

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#7 Post by Aleksandar.Mitrovic » 29 Jun 2015 16:29

Dear Rick,

Can you please tell me where did you find this data:
TheBlues wrote:<cconfiguration id="com.ti.ccstudio.buildDefinitions.TMS470.Release.1615536388"> // CodeComposer 6.10 Example
<cconfiguration id="com.ti.ccstudio.buildDefinitions.TMS470.Release.135231643"> // EasyMXPro Example
I tested this example for UART on EasyMx PRO v7 board and TM4C129XNCZAD MCU and all worked well.
In attachment you will find .hex file for testing both UART's.

Just download .hex with mikroProg Suite for ARM and program your MCU with board programmer.
Do not forget to turn on switches on SW5 from 1 to 6.

Regards,
Aleksandar
Attachments
USB_UART.rar
(6.69 KiB) Downloaded 153 times

TheBlues
Posts: 9
Joined: 08 May 2015 02:05

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#8 Post by TheBlues » 02 Jul 2015 00:54

Hi Aleksandar:

In the EasyMX_UART.zip file there is a file called .cproject. I found the lines in question in that file.

With you saying that the example works and the TI support forums saying to "strip out TI-RTOS", I am pretty sure TI-RTOS may be the offender here. I need a bit of time to validate.

I really like the various TI drivers and I do not know if I can use them without TI-RTOS. In other words, if I stop using TI-RTOS, will I have to also take the drivers out? (probably)

Thank you for your help and your quick reply.

Rick

User avatar
Aleksandar.Mitrovic
mikroElektronika team
Posts: 1697
Joined: 11 Mar 2015 12:48

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#9 Post by Aleksandar.Mitrovic » 02 Jul 2015 15:17

Dear Rick,

As I mentioned before we do not provide support for CodeComposer and we do not use it in our company.
TheBlues wrote:I really like the various TI drivers and I do not know if I can use them without TI-RTOS. In other words, if I stop using TI-RTOS, will I have to also take the drivers out?
I believe that more information related to this you can get from Texas Instruments.

Can you please tell me to which drivers exactly do you refer?

Best regards,
Aleksandar

TheBlues
Posts: 9
Joined: 08 May 2015 02:05

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#10 Post by TheBlues » 02 Jul 2015 15:27

Hi Aleksandar:

The TI-RTOS drivers were very easy to work with.
I have a decent understanding of what I need to do without TI-RTOS.

At this point, I have to get up to speed on a lot of the "stuff" that I didn't have to worry about before.
I'm not happy about this; but, hopefully I can get up to speed quickly.

When I set my clock, I tried to set it to 50Mhz.
SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN);

What did you set your clock to?

Thanks

Rick

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#11 Post by filip » 03 Jul 2015 15:02

Hi,

Please find the configuration picture in the attachment.

Regards,
Filip.
Attachments
img.gif
img.gif (14.43 KiB) Viewed 5613 times

TheBlues
Posts: 9
Joined: 08 May 2015 02:05

Re: UART Tiva TM4C129 Code Composer MX Pro v7

#12 Post by TheBlues » 03 Jul 2015 18:01

Hi Filip:

The program is running fine with Code Composer. Thank you.

TI replaced the SysCtlClockSet() function with SysCtlClockFreqSet() for the TM4C129 chip sets.

I used the SysCtlClockGet() return as input into the UART routine. Another mistake.
This routine will not work either.

Thus, the EasyMX_UART example will not work with the MX Pro board if it has a TM4C129 chip.

I had to strip out the TI-RTOS code to get this running. Many thanks to Mikro team! I just needed a few hints.

Please close this ticket.

Rick

Post Reply

Return to “Development Boards”