• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » C6000 Single Core DSP » C67x Single Core DSP Forum » How to control UPP peripheral channels independantly
Share
C6000 Single Core DSP
  • Forums
  • Announcements
Options
  • Subscribe via RSS

How to control UPP peripheral channels independantly

How to control UPP peripheral channels independantly

This question is not answered
chandrashekhar mishra
Posted by chandrashekhar mishra
on Aug 27 2011 06:46 AM
Intellectual915 points

Hi,

I am using UPP peripheral of TMS320C6748 to connect FPGA for High speed data transfer. I am using upp_bios_drv_v10 provided at wiki. I want to configure upp peripheral in DUPLEX 1 mode of operation but need separate handles for CH A and CH B. I want to keep read and write operations to these channels independant of each other. I am unable to get handle using GIO_create with IOM_INPUT/IOM_OUTPUT parameter. It works only with IOM_INOUT. Is it possible to operate it independantly ? I mean if some read operation is going on CH B and at the same time if I will configure CH A for write operation, will it work without interferring other channel operation?

Regards,

Chandra

 

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Joe Coombs
    Posted by Joe Coombs
    on Sep 01 2011 16:10 PM
    Expert8845 points

    Chandra,

    The uPP driver on the wiki only supports channel creation using the IOM_INOUT mode, but the uPP channels are still independently programmable.  Calls to GIO_read() or GIO_write() must include a transfer handle.  The struct pointed to by this handle specifies which uPP channel will execute the transfer.  This allows you to manage both uPP channels using a single GIO handle.

    Alternatively, you can also use the uPP driver included in the BIOS PSP for C6748, which can be downloaded from this page:

    • http://software-dl.ti.com/dsps/dsps_public_sw/psp/BIOSPSP/index.html

    The PSP driver allows you to create separate SIO handles for each uPP channel, which may be more intuitive.

    Hope this helps.

     


    Please click the  Verify Answer  button on this post if it answers your question.

     

    uPP
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • chandrashekhar mishra
    Posted by chandrashekhar mishra
    on Sep 02 2011 03:30 AM
    Intellectual915 points

    Hi Joe,

    Thanks for reply. I have some doubts which I would like to clarified from you,

    1) Related to uPP driver on the wiki : Consider the scenario where two tasks are running with different priority. Let us assume low priority task has executed GIO_write and waiting for Transmit EOL callback at the same time if I got interrupt/event to Receive data on upp channel and scheduled high priority thread to execute GIO_read which will configure DMA for Rx channel. Whether this condition can create UPP peripheral to reset or data corruption on Tx Channel.

    2) Whether BIOSPSP driver will work with GIO calls. Because example are given with SIO and user document described with GIO.

    3) Unable to run uppSample example of BIOSPSP. It compiles but hangs during loading. It never goes to main().

    Thanks,

    Chandra

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Joe Coombs
    Posted by Joe Coombs
    on Sep 02 2011 11:39 AM
    Expert8845 points

    Chandra,

    Here are my answers to your questions:

    1. The drivers should be thread safe and re-entrant.  If you look at the source code, you should see HWI_disable() and HWI_restore() calls protecting critical actions, such as programming uPP transfers.
    2. I have not personally verified that GIO APIs work properly with the PSP driver.  If the documentation says that GIO is supported, then it should work. :)
    3. If a BIOS application does not reach main(), that generally means that some error has occurred during system initialization.  Some common problems include: using the wrong GEL file (i.e. some software expects the PSC and pinmux settings to be applied before the application is run), incorrect system setup in the TCF or TCI files, or memory map issues (ex. heap/stack too small).

    Hope this helps.

     


    Please click the  Verify Answer  button on this post if it answers your question.

     

    uPP
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • chandrashekhar mishra
    Posted by chandrashekhar mishra
    on Sep 03 2011 05:13 AM
    Intellectual915 points

    Hi Joe,

    I am able to add BIOSPSP upp driver to my application & able to load it also. But when first time I am calling  GIO_read to Receive data on RX Channel, code gets hang and I am able to see Following in Debug console

    Thread[main](Suspended)-> _PWRM_F_idleStopClk() at _pwrm_idleGemInclude64P.s64P:37 

    Same is the case of BIOSPSP sample also but it gets stuck before main.

    Regards,

    Chandra

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Raghavendra Maddikery
    Posted by Raghavendra Maddikery
    on Sep 08 2011 05:20 AM
    Expert5500 points

    Hi Chandra,

    The BIOS PSP 01_30_01 you are referring to, provides 2 sample applications - upp and uppEvm (Placed in : pspdrivers_01_30_01\packages\ti\pspiom\examples\evm6748)

    upp - Demonstrates the usage of upp in Loopback mode. whereas,

    uppEvm - Demonstrates the usage of upp driver in the duplex mode 0 of operation (for this you need to connect two EVM's. Run uppEvmA on one EVM and  uppEvmB on other EVM ) Please refer section 18.12 of C6748_BIOSPSP_Userguide.

    Which sample application are you using?. If it is the first one, the application should run in one go. If it is the second one well, the uppEvmA application hangs until it receives data from the uppEvmB. Load and run the default binaries that come with BIOS PSP first - this confirms all is good with the hardware/setup. Then you can proceed with own modifications and build.

    GIO_read(...) is a blocking call and it hangs forever provided no 'timeout' is set.

     

    chandrashekhar mishra

    I want to keep read and write operations to these channels independant of each other. I am unable to get handle using GIO_create with IOM_INPUT/IOM_OUTPUT parameter. It works only with IOM_INOUT

    If you refer the upp or uppEvm sample application, read and write operations are created/work independant of each other - using SIO calls. Please refer BIOS Userguide for more details on this.

     Hope this helps..

     

    Thanks & regards,

    Raghavendra   

    Does this help with your question? If not, please send back more information. If it answers your question, please click the  Verify Answer  button below.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • chandrashekhar mishra
    Posted by chandrashekhar mishra
    on Sep 08 2011 23:23 PM
    Intellectual915 points

    Hi Raghwendra,

    I am trying to run upp Loopback mode for single evm. This itself I am unable to run because code gets stuck at

    Thread[main](Suspended)-> _PWRM_F_idleStopClk() at _pwrm_idleGemInclude64P.s64P:37 

    even before reaching to main(). I am able to run  PSP examples for other peripherals with same setup (EVM Board and gel file). I also disabled V/F Scaling support  of Power Manager properties which required for all BIOSPSP example to work.

    Regards,

    Chandra

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Raghavendra Maddikery
    Posted by Raghavendra Maddikery
    on Sep 09 2011 01:00 AM
    Expert5500 points

    Hi Chandra,

    Did you try with the default binaries?. If not, please try it.

    Would it be possible to share your project? It can speed up the debugging. Also, please list all the tool versions you are using..

     

    Thanks & regards,

    Raghavendra

    Does this help with your question? If not, please send back more information. If it answers your question, please click the  Verify Answer  button below.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • chandrashekhar mishra
    Posted by chandrashekhar mishra
    on Sep 10 2011 07:19 AM
    Intellectual915 points

    Hi Raghavendra,

    I tried pre-compiled upp sample binary to run and it is loading the .out file but I could not see LOG_printf messages as I am getting error message that XDC path /XDC tool is not set. Even though I can see it in preferences window. I attached the snapshot of error message

     

    Also I am using  following tools

    CCS Version 4.2.4.00033

     Code Generation tool: TI v 7.2.3

    DSP/BIOS: 5.41.10.36

    PSP version:pspdrivers_01_30_01

    I could not load even after recompiling the same upp sample example provided with psp driver

    Regards,

    Chandra Shekhar Mishra

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Raghavendra Maddikery
    Posted by Raghavendra Maddikery
    on Sep 12 2011 02:37 AM
    Expert5500 points

    Hi Chandra,

     

    chandrashekhar mishra
    I tried pre-compiled upp sample binary to run and it is loading the .out file

    So, by loading the default binaries you did not face any issues. Probably there is something wrong in the build setup or application.

    The LOG_printf messages cannot be viewed in CCSv4 console. You can view it in CCSv3.3. But not to worry, you can even verify in CCSv4 by placing a breakpoint in the application. If you open uppSample_io.c file, line - 387 "LOG_printf(&trace,"Sample Application completed...");" Place a breakpoint at this point and run the application. Hitting this point would confirm working of the sample application.

    Coming to the tools,I request you to install all the tools mentioned in the C6748_BIOSPSP_Userguide - section: 1.2.1,build driver and application and then test.

    Have you done any modifications to the upp.pjt and uppSample.pjt files?. If so, please let us know the changes made.

    Thanks & regards,

    Raghavendra

    Does this help with your question? If not, please send back more information. If it answers your question, please click the  Verify Answer  button below.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jacob Leemaster
    Posted by Jacob Leemaster
    on Jun 21 2012 18:44 PM
    Prodigy70 points

    Hi,

    I'm experimenting with the PSP uPP driver and am now very confused.  is the uPP GIO interface synchronous or asynchronous?

    Several documents refer to GIO as a synronous interface, but from the UPP Device Driver Design document (page28):

    The UPP IOM driver supports only asynchronous IO mechanism. In Asynchronous IO
    mechanism multiple IO requests can be submitted by the application thread without
    causing it to block while waiting for the IO request to complete. Application can
    submit multiple I/O requests using the “GIO_read ()” or “GIO_write ()” (also SIO)
    APIs and specify a callback function to be called after the IO transfer is completed.

    This reads to me that the GIO interface into UPP is asyncronous and uses callbacks.

    Also, both examples of UPP in the PSP only provide examples of using the SIO interface to UPP.  it is very difficult to use the GIO interface with no example code to reference

    Also, the BIOS PSP User Guide, in the section which describes the UPP driver only discusses the GIO interface but not the SIO interface. Does this mean that GIO is the preferred interface and if so, why do the examples solely use the SIO interface?  If SIO is the preferred interface why does the user guide only discuss the GIO interface?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Raghavendra Maddikery
    Posted by Raghavendra Maddikery
    on Jun 22 2012 04:12 AM
    Expert5500 points

    Hi Jacob,

     

    I assume you are using the BIOS PSP 01.30.01

    Sorry for all the confusion made.

     

    UPP can be operated in asynchronous/synchronous IO mechanism depending on the BIOS APIs being used in the application.

    • GIO_write()/GIO_read() will be used for synchronous mode of operation.
    • ‘GIO_submit() with an appropriate callback’ or ‘SIO_issue()/SIO_reclaim() pair’ will be used for asynchronous mode of operation.

    Note: Refer DSP/BIOS userguide for GIO and SIO APIs.

    The UPP application provided in the PSP 1.30.01 will make use of ‘SIO_issue()/SIO_reclaim() pair’, which will demonstrate the usage of UPP driver asynchronously.

    Best Regards,

    Raghavendra

    Does this help with your question? If not, please send back more information. If it answers your question, please click the  Verify Answer  button below.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jacob Leemaster
    Posted by Jacob Leemaster
    on Jun 27 2012 16:31 PM
    Prodigy70 points

    The GIO_write/GIO_read issue seems to be the source of my confusion.  Why does the userguide for the UPP  API's only  refer to the (supposedly synchronous) GIO_read/write calls if according to the same user-guide, synchronous calls are not supported (see quote from previous post)? this reads as if the normally synchronous GIO_read/write calls can be used asycronously and makes no mention of GIO_submit anywhere.  

    P.S. I am indeed using PSP 1.30.01

    I've tried using GIO_submit and do see a few registers in the upp address space change, but i never seem to enter my upp_rx (configured via UppChanParams).  I have my upp configured as:

    uppParams = Upp_PARAMS;
    uppParams.devMode = Upp_DevMode_DUPLEX_1;
    uppParams.dlbMode = Upp_Loopback_ENABLE_AB;
    uppParams.emulationMode = Upp_EmuMode_SOFT_STOP;
    uppParams.pllDomain = Upp_pllDomain_0;
    uppParams.pscPwrmEnable = FALSE;

    With the following channel parameters:

    Upp_ChanParams uppChanparamA =
    {
    TRUE,
    Upp_ChanSel_A,
    Upp_bitWidth_8,
    Upp_dataRate_SINGLE,
    Upp_ChanMode_NORMAL,
    Upp_dataPackFmt_RJZE,
    10000000,
    0xFFFF,
    NULL,
    NULL,
    NULL,
    NULL,
    Upp_fifoThreshold_64,
    {
    TRUE,
    Upp_polarity_ACTIVE_HIGH,
    TRUE,
    Upp_polarity_ACTIVE_HIGH,
    TRUE,
    Upp_polarity_ACTIVE_HIGH,
    Upp_clkPol_RISING_EDGE_SYNC,
    Upp_PinIdleState_IDLE_VAL,
    }
    };

    // parameters for channel B
    Upp_ChanParams uppChanparamB =
    {
    TRUE,
    Upp_ChanSel_B,
    Upp_bitWidth_8,
    Upp_dataRate_SINGLE,
    Upp_ChanMode_NORMAL,
    Upp_dataPackFmt_RJZE,
    10000000,
    0xFFFF,
    uppReadCallback,
    NULL,
    uppReadCallback,
    NULL,
    Upp_fifoThreshold_64,
    {
    TRUE,
    Upp_polarity_ACTIVE_HIGH,
    TRUE,
    Upp_polarity_ACTIVE_HIGH,
    TRUE,
    Upp_polarity_ACTIVE_HIGH,
    Upp_clkPol_RISING_EDGE_SYNC,
    Upp_PinIdleState_IDLE_VAL,
    }
    };

    and creating my gio handles with : 

    GIO_Handle* uPPoutputPtr;
    GIO_Handle* uPPinputPtr;
    *uPPoutputPtr = GIO_create("/Upp0", IOM_OUTPUT, &status, &uppChanparamA, NULL);
    *uPPinputPtr = GIO_create("/Upp0", IOM_INPUT , &status, &uppChanparamB, NULL);

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Raghavendra Maddikery
    Posted by Raghavendra Maddikery
    on Jun 28 2012 09:43 AM
    Expert5500 points

    Hi Jacob,

    Jacob Leemaster
    The GIO_write/GIO_read issue seems to be the source of my confusion.  Why does the userguide for the UPP  API's only  refer to the (supposedly synchronous) GIO_read/write calls if according to the same user-guide, synchronous calls are not supported (see quote from previous post)? this reads as if the normally synchronous GIO_read/write calls can be used asycronously and makes no mention of GIO_submit anywhere.  

    I understand your point. The data in the Userguide(w.r.t API's) is not appropriate. Sorry for misleading you.

    Please consider my previous post wherein I have provided the right information required. I hope you do not have any queries w.r.t that.

    Coming to the application, what exactly is your application scenario?. Looking at the UPP configuration shared, all the settings seems to be fine. Is "upp_rx" a callback function?.

    Please test the sample application that comes with the PSP and verify.

    Best Regards,

    Raghavendra

    Does this help with your question? If not, please send back more information. If it answers your question, please click the  Verify Answer  button below.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jacob Leemaster
    Posted by Jacob Leemaster
    on Jul 03 2012 10:14 AM
    Prodigy70 points

    Yes, meant to refer to upp_rx is actually uppReadCallback() with the following declaration:

    void uppReadCallback(Uint32 arg1, Uint32 arg2, Uint32 arg3)

    i'm currently just trying to get a basic upp driver working and am currently trying to use the GIO_submit function you described earlier.  since I'm trying to use the GIO_submit, the example code (which only uses SIO interface) isn't too helpful.   

    should I just give up on GIO and switch to SIO?  

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Raghavendra Maddikery
    Posted by Raghavendra Maddikery
    on Jul 04 2012 02:59 AM
    Expert5500 points

    Hi Jacob,

    Before you start using the GIO_submit(...) call in asynchronous mode, please verify if the GIO_submit(...) API in synchronous mode is working first(by not providing the callback function). Just do a ''write'' to the upp channel, and check if it is returning/completing successfully without any errors/hang. This is just to verify if the GIO settings are appropriate. Then you can proceed further by providing the application callback function to monitor its completion. The GIO_submit(...) call in asynchronous mode should be able to work.

    Since it is a loopback application, need to send a read request first and then a write.

    You can also verify/try by placing a breakpoint in the "uppIntrHandler(...)" function(in Upp.c driver file) to check if any completion interrupts are generated. Also, check if it is hitting the function "uppCompleteCurrentIo" wherein, the function completes the current pending request and then invokes the application registered callback(Line 2151 of Upp.c file).

    Jacob Leemaster
    should I just give up on GIO and switch to SIO?

    Not necessary. The reason I asked to test the sample application(that comes with the PSP) is just to verify the setup.


    Best Regards,

    Raghavendra

    Does this help with your question? If not, please send back more information. If it answers your question, please click the  Verify Answer  button below.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use