10 Replies Latest reply on Jun 9, 2017 4:37 PM by user_1944561

    uart tx from dma

    KeYp_290406
              Does anyone know the proper destination when feeding a uart tx from dma? I tried HI16(CYDEV_PERIPH_BASE) for the hi and LO16((uint32)UART_TXDATA_REG) for the low. I think the low might be wrong as it doesn't work.   
        • 1. Re: uart tx from dma
          JoMe_264151

          You will have to specify a pointer to the Rx register as target and not the register itself.

             

           

             

          Bob

          • 2. Re: uart tx from dma
            DaKn_263916

            These might be of assistance -

               

             

               

                

               

                      

               

            http://www.cypress.com/?rID=37793     AN52705     Getting Started with DMA

               

            http://www.cypress.com/?rID=82680     AN84810     PSoC® 3 and PSoC 5LP Advanced DMA Topics

               

            http://www.cypress.com/?rID=44335     AN61102 PSoC® 3 and PSoC 5LP - ADC Data Buffering Using DMA

               

            http://video.cypress.com/video-library/search/dma/     Videos on DMA

               

            https://www.youtube.com/results?search_query=dma+psoc Videos on DMA (some overlap)

               

             

               

            Regards, Dana.

            • 3. Re: uart tx from dma
              KeYp_290406

               

                 

              LO16((uint32)DMX1_UART_TXDATA_PTR) is working for dma to uart tx. Thanks for the first reply. They should simply state this in the uart component data sheet rather than telling you to use the register as the dma target. I did read the dma app notes before starting, they were helpful showing how to set up the TDs but not for something specific like dma to uart. They should probably add more peripherals like uart to the dma wizard. Cypress documentation can be annoying at times but compared to others it's pretty good.

              • 4. Re: uart tx from dma
                        Hello Kypparila, The destination address for lower 16-bits should be LO16((uint32)&UART_TXDATA_REG). Please find attached the example project. You may also use "UART_BUART_sTX_TxShifter_u0__F0_REG" as the destination address for lower 16-bits. Thanks, Goverdhan   
                • 5. Re: uart tx from dma
                  JoMe_264151

                  @Goverdhan

                     

                  &UART_TXDATA_REG

                     

                  and

                     

                  UART_TXDATA_PTR

                     

                   

                     

                  are perfectly the same, have a look into the declaration - macros

                     

                   

                     

                  Bob

                  • 6. Re: uart tx from dma

                    Hello friends, I need to communicate with a NEXTION smart screen, Using the PSOC 5LP UART. I have to show three variables on the screen and receive data as well. I want you to tell me which are the sentences that I should use since I am new using PSOC....Sorry for my english I am from Argentina....Thanks for your time

                    • 7. Re: uart tx from dma
                      JoMe_264151

                      Welcome in the forum, although it is not a good idea to hijack a 3 year old thread with a completely new question.

                         

                      It would have been better to create a new thread.

                         

                      To your question: PSoC5 LP has got several UART interfaces using 3.3 to 5V I/O level, so interfacing will not be a problem.

                         

                      Converting numbers to string could be done best using sprintf() library function. Cursor positioning depends on the commands your display understands, VT100 is a widely used command set.

                         

                      To get sprintf() running you need to

                         
                            
                      • #include <stdio.h>
                      •     
                      • Set "use newlib nano"
                      •     
                      • Set "Use newlib nano float formatting" in Build Settings -> Linker
                      •     
                      • And increase heap size to 0x0200 in system view.
                      •    
                         

                       

                         

                      Happy coding

                         

                      Bob

                      • 8. Re: uart tx from dma


                        Sorry for the kidnapping, I did not know how to create the new theme hahaha.
                        The screen has serial communication, is a touch screen, this screen is configured with a soft from the pc. Buttons, progress bars, or needles can be placed to indicate variations. Observe a communication type using UART_PutChar () and UART_GetChar () but only one bit was sent. And as I said I need to send three different values to the screen and receive the status of a button that you configure ... thank you very much for replying
                         

                        • 9. Re: uart tx from dma
                          JoMe_264151

                          Sending more than 1 byte requires to use UART_PutString() API after filling your buffer using sprintf() as described before.

                             

                           

                             

                          Bob

                          • 10. Re: uart tx from dma


                            thank you......I was reading the data sheet, I'm going to use your advice