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.

Quick question for Amit Ashara

Hello Amit!

In my last post, you send to me working UART uDMA code, which receive Data from PC.

Can you a little bit more explain, how you tested/send data to Launchpad?

Today I'm all day trying it, sending longer than 16 characters data via Putty program or Terminal v1.9b, buffers still empty..

2148.UART_uDMA.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "inc/hw_uart.h"
#include "driverlib/fpu.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/sysctl.h"
#include "driverlib/systick.h"
#include "driverlib/uart.h"
#include "driverlib/udma.h"
#include "utils/cpu_usage.h"
#include "utils/uartstdio.h"
#include "utils/ustdlib.h"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

at startup_ccs

extern void uDMAErrorHandler(void);
extern void UART0IntHandler(void);

    IntDefaultHandler,                      // GPIO Port E
    UART0IntHandler,                      // UART0 Rx and Tx

    uDMAErrorHandler,                       // uDMA Error

    IntDefaultHandler,                         // uDMA Software Transfer uDMAIntHandler

  • Hello Gytis,

    To test the code, I used the TeraTerm to send the characters. Did the original code I sent work?

    Regards

    Amit

  • This is your original code and I trying make it work... I tryed and with TeraTerm program, still nothing, g_pui8RxPing & g_pui8RxPong buffers are empty after sending even more than 16 characters. And I can see, that interrupt was never fired up..

    My launchpad work good, original uDMA_demo example work too..

  • Hello Gytis,

    I compared the C source file in this post to he C source file I had sent earlier. There are changes

    1. UART0 is now being used?

    2. You have enabled Alternate Channel Control Structure to be used for the first transfer which is going to be Ping (or Primary Control Structure)?

        ROM_uDMAChannelAttributeEnable(UDMA_CHANNEL_UART0RX,
                                        UDMA_ATTR_ALTSELECT | UDMA_ATTR_USEBURST |
                                        UDMA_ATTR_HIGH_PRIORITY |
                                        UDMA_ATTR_REQMASK);

    Regards

    Amit

  • Yea,

    Sorry, I sent to you wrong code, in this one, I try all the different kind conbinations to enable UART uDMA..

    Im trying your to me send code, nothing change!!! ( its with ROM_uDMAChannelAttributeDisable and UART1 )

    So, how I try your code:

    1) I putt your code to CCS, press Build Debug button. I get 0 warnings, 0 errors, 0 others!

    2) I debug your code, enerything Good!  Like always, press Resume button, code start work..

    3) Turn on Tera Term program, select Serial -- > Port: COM4: Stellaris Virtual Serial port (its my launchpad port)

    4) Now in black window, I go up to setup --> Serial setup --> changes only baud rate to 115200.

    5) In black window write 16 "FFFFFFFFFFFFFFFF" characters, or more, in this case I try a lot different combinations...

    6) In CCS, then I press suspend button, go to memory browser, check g_pui8RxPong g_pui8RxPing values and its always empty...

    I tryed in different methods, sometimes first modify TeraTerm, aftern that start code working and etc..

     

     

  • Hello Gytis,

    I will change the application code to do the same with UART0 so that you can use the TeraTerm without making any wiring changes to the LaunchPad.

    Also do make sure that in the CCS window the peripheral is not selected for Memory Browser.

    Regards,

    Amit

  • @ Amit - You've gone (again) above/beyond w/this fellow.  Yet - while much valuable UART Set-Up/Config is likely to result - the (poorly considered) Subject/Title by poster will mean this will (likely) be a one-time viewed thread - unlikely to "register" upon any "UART" search.  "UART Set-Up detail" - imho - seems vastly better subject/title - raises the odds for future, "UART seekers."  That is a forum goal - is it not?

    As this purports to be, "Quick Question" - cannot imagine the size, twists, indirections of one, "not so quick..."

  • cb1_mobile said:
    twists, indirections of one, "not so quick..."

     I bypassed at first time... privacy need a concern, may be it was a Secret love declaration ;)

  • Mon Ami,

    You may consider brief "cut back" in your read/review of romance novellas - popular (I'm told) your, "neck of the woods."  Strictly ARM & general EE issues "flow w/some regularity" - fine pen - this reporter...  (don't you dare)

  • Thank you Amit, its working!!

  • Hello Gytis,

    Can you post what was the issue?

    Regards

    Amit

  • Might such posting violate the "quickness" of poster's question?  (that "quick" title still casts zero light upon what went on - this long (surely not quick) thread...)