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.

UART code using interrupts

Other Parts Discussed in Thread: AM1808, AM1707

Hello,

I was trying to build a test code in CCS for UART testing. I already have AM1808 BSL in which UART test code is available but I am unable to find any interrupt based Tx or Rx in that. I also have Staterware but it works on CCS5 and I am using CCS4.2.

Kindly provide a test code for UART which is interrupt based. 

  • Vipul,

    I am afraid not at the moment. You might have to manually create a CCS4.2 project and choose all the options/path included in the starterware example. Have you considered upgrading to CCS5?

    regards,

    Paul

  • Update (2012-01-12): to prevent further confusion, the nonworking project has been removed.  For a successful port to AM1707 + CCS4, see here.


    I'm also using CCS4, and it seems possible to recompile a minimal subset of source code from StarterWare (see below)--but I have not been able to confirm that this works, because I am also trying to port the uartEcho example to AM1707. 

    In particular, for my AM1707 setup (which has a completely different UARTPinMuxSetup() function but is otherwise more or less unmodified) with out-of-box evmam1707.gel, the UART API seems to work fine without interrupts, but the interrupt code (which looks perfectly fine! do I have wrong project/other chip settings somewhere?!) does not work correctly.

    This minimal subset is attached as uartEcho.zip:

    • examples/evmAM1808/uart/uartEcho.c
    • include/psc.h
    • include/uart.h
    • include/armv5/cpu.h
    • include/armv5/am1808/evmAM1808.h
    • include/armv5/am1808/interrupt.h
    • include/armv5/hw/hw_aintc.h
    • include/armv5/hw/hw_types.h
    • include/armv5/hw/hw_syscfg0_AM1808.h
    • include/armv5/hw/hw_psc_AM1808.h
    • include/armv5/hw/hw_uart.h
    • include/armv5/hw/soc_AM1808.h
    • drivers/psc.c
    • drivers/uart.c [renamed to uart_api.c]
    • platform/evmAM1808/uart.c [renamed to uart_platform.c]
    • system_config/am1808/interrupt.c
    • system_config/armv5/cgt/cpu.c
    • C:\Program Files (x86)\Texas Instruments\ccsv4\tools\compiler\tms470\lib\rtssrc.zip\boot.asm
    • in (32-bit) _c_int00: ORR     r0, r0, #0x13 ; SET SUPERVISOR MODE

    Please let me know if this works for you, since that would (1) confirm that this subset of code suffices to use the StarterWare Interrupt API, and (2) eliminate these files as the source of my problems.

    Best,
    Jonathan

  • Here is another option (even though using Starterware is a better longer term option)

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

    There is an interrupt based loopback example for UART. 

  • Just wanted to point out for StarterWare users that there is now a working CCS4 project for the uartEcho example (UART + interrupts).  The posted project is for AM1707, but the code originates from AM1808 StarterWare, so it should not be very difficult to "backport".

  • Jonathan,

    I tried the code posted by you but it didn't worked. 

    Did you tried the same code and it worked? Plz send your working code.

  • Thanks Mukul for the link.

    The CSL code worked well.

    I was able to use interrupt as well as non interrupt mode.

  • Dear Vipul,

    My code from this thread was not working and has been removed.

    The code at the AM17x StarterWare thread is for AM1707 + CCS4, and due to pinmux differences should not work on AM18x.  The zip file "sw_am17x_2012-01-10-UART_interrupt_works!.zip" should work on the AM1707 EVM board from TI/Spectrum Digital.  You may need to create a new CCS project; sorry, I am new to CCS and not sure what the best way is to post projects. 

    Following the AM17x StarterWare instructions but skipping the pinmux steps, you should be able to make a CCS4 project for AM1808 starting from StarterWare source.

    Good luck,
    Jonathan