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.

EK-TM4C1294XL icdi virtual com port and can modules

Other Parts Discussed in Thread: EK-TM4C1294XL, ENERGIA, TM4C1294NCPDT

Hi All,

 

I used stellaris and tiva launchpads for a while with great success. Becouse of student, we are using Energia (energia-0101E0016). However, now I need two can buses. So I bought a connected launchpad (EK-TM4C1294XL). As I read at spmu365b.pdf , to use both can moduless, I need to change JP4 and JP5 from default (UART) to other (CAN) pos. If I see the manual correctly, from now I need to use uart4 instead of uart0. So in energia, I used Serial4, not Serial class. But I see nothing on my console (nor in Linux neither in win). 

 

I write small program which signs on the leds too, and it seams to be download correctly, begin to run. Tried from Serial - Serial[1-7] and no result, even a rambling byte dont arrive to my PC. 

So I goes forward, and  found some interesting stuff. At the energia 16 HardwareSerial.cpp:

 

#elif defined(PART_TM4C1294NCPDT)
    {GPIO_PA0_U0RX, GPIO_PA1_U0TX}, {GPIO_PB0_U1RX, GPIO_PB1_U1TX},
    {GPIO_PA6_U2RX, GPIO_PA7_U2TX}, {GPIO_PA4_U3RX, GPIO_PA5_U3TX},
    {GPIO_PK0_U4RX, GPIO_PK1_U4TX}, {GPIO_PC6_U5RX, GPIO_PC7_U5TX},
{GPIO_PP0_U6RX, GPIO_PP1_U6TX}, {GPIO_PC4_U7RX, GPIO_PC5_U7TX}
#else
 
So there is no PD4/5.
 
With pinmux utils: PD4 and PD5  Rx/Tx for UART2, but alternate to PA6/PA7 - and energia userd PAx. In spmu365b.pdf, is different. In table 2-2. Seams to PD4/5 belong to UART2, but in section "2.3.3 Virtual COM Port" states: 
"When plugged into a USB host, the ICDI enumerates as both a debugger and a virtual COM port. JP4 and JP5 control the selection of which UART from the TM4C1294NCPDTI is connected to the virtual COM port. In the default configuration, UART0 maps to the virtual COM port of the ICDI. In the CAN jumper configuration, UART4 maps to the virtual COM port of the ICDI."
 
Should I just change HardwareSerial.cpp at all 3 places to change uart2 ports? Is the documentation wrong about uart4 ?

Can I use two can modules and ICDI virtual com port in same time from energia? How?

 

THX && HAND

  • Hi Zoltan,

    Without getting totally overwhelmed reading your post the CAN jumpers redirect the TM4C1294 UART4 over to the Booster pack header pins BP_A2.5/2.6 (X6.9/X6.11). You may also have to program the CAN peripheral registers to use PA0/PA1 for UART0 .

    Some ideas come to mind. Perhaps either interface BP_A2.5/A2.6 with a CAN driver serial chip on a custom PCB, install an aftermarket Booster pack with CAN support and or use the Windows CAN serial virtual CDM driver with the USB port on an aftermarket Booster pack. Schematic text states JP4/5 support CAN local area network on the Booster pack pins BP_A2.5/A2.6

    If or when this post answers your question be sure to click on Question Answered.
    Thanks!
  • BTW: Schematic leaves out info, does not state when JP4/5(2-4) UART0 of TM4C1294 switches to the Booster pack header pin A2.5/A2.6.
  • Hi,

    For the CAN side, things seams quite straight. The CAN0 can use PA0/1, CAN1 can use PB0/1, no alternatives. PA0/1 maybe on boosterpack, but PB0/1 dont. So i made a custom PCB with 2 can trans. using EK-TM4C1294XL breadboard connector. I wrote the program, but I need to set up a test, becouse no serial console on it.

    So, my problem is the ICDI vcom port, aka serial console. It don't work, if I change JP4/5. I will modify the energia lib, but the connected launchpad manual says serial4 on pin PD4/5, but on TM4C1294NCPDT docs and pinmux util says that PD4/5 maybe belong to serial2, not serial4...

    I hope I can finish the test today, I will report about it.

    THX.
  • I changed the energia libs, uart2 now using not PA6/7 but PD5/4. Now I can use EK-TM4C1294XL JP4/5 with energia. If JP4/5 in uart pos, the normal Serial (uart0) object is the virt. com. port. If the JP4/5 in CAN pos, the Serial2 (uart2) is the virt. com. port on ICDI. So the spmu365b.pdf is wrong about UART4!

    The diff for energia lib posted on energia (43oh) forums (forum.43oh.com/.../8861-ek-tm4c1294xl-icdi-virtual-com-port-and-can-modules).

    Bye,
  • >launchpad manual says serial4 on pin PD4/5,

    Agree - PD4/5 of TM4c1294 JP4/5 (3-4) sets UART2 to BP2_A2.5/6 but JP4/5 (1-2) still select UART0

    The default JP4/5 (1-2) most definitely sets TM4C1294 UART0 to the  ICDI TM4C123 UART0 by crossing TX into RX, visa versa.

    That infers Target6.1 TXD/RDX go to UART0 of  TM4C123 A0/A1 pins.

    Populate from 1-3 and 2-4 for controller area network on the booster pack.

    >>>> UART2 of TM4c1294 is then available to ICDI TM4c123.

    >>>> And UART0 is then available to Booster pack pins.  

  • The EK-TM4C1294XL Schematic shows and states UART2 and text is incorrect.

    JP4 and JP5 are used to configure CAN signals to the Booster Pack 2 interface. In the default horizontal configuration, CAN is not present on the Booster Pack. UART 4 (2) goes to the Booster Pack and UART 0 goes to the ICDI virtual serial port to provide ROM serial boot loader capability.

    In the vertical CAN-enabled configuration, UART 4 (2) goes to the ICDI virtual serial port and CAN signals are available on the Booster Pack.

    .