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.

CCS/AWR1642BOOST: Adding CBUFF user buffer info(sessionCfg.u.swCfg.userBufferInfo[1]) in SRR demo(TIDEP-0092)

Part Number: AWR1642BOOST
Other Parts Discussed in Thread: TIDEP-0092

Tool/software: Code Composer Studio

Hi all,

In the SRR demo while opening the LVDS output function, I can get the data to my PC through LVDS and DCA1000 with mmWave studio sw, but the max data I can get with only using 1 CBUFF user beffer is 3FFF * 2 =  32766Bytes

I learned that i can add user buffer(sessionCfg.u.swCfg.userBufferInfo[1] and [2]) to get more data since from the last few posts

But while trying to achieve this I am facing some  problems, I'm not sure which step I am  wrong, I just added another gSwUserBuffer and here are a part of my code:

volatile uint16_t gSwUserBuffer1[2048] 

volatile uint16_t gSwUserBuffer2[2048] 

sessionCfg.u.swCfg.userBufferInfo[0].size = sizeof(gSwUserBuffer1)/2;

sessionCfg.u.swCfg.userBufferInfo[0].address= (uint32_t*)&gSwUserBuffer1[0];

sessionCfg.u.swCfg.userBufferInfo[1].size = sizeof(gSwUserBuffer2)/2;

sessionCfg.u.swCfg.userBufferInfo[1].address= (uint32_t*)&gSwUserBuffer2[0];

I can get data with 1 gSwUserBuffer  through LVDS while SRR demo is running, but while I added another gSwUserBuffer , I can't get any LVDS data output to my PC

I suppose there are some steps I've missed but I'm not quite sure, hope that you can help me figure this out

  • Hi,

    Can you please share with the forum the LUA script you are using for radar studio?

    Thank you
    cesar
  • Hi Cesar,

    I'm using the script  provided me in the thread link below :

    https://e2e.ti.com/support/sensors/f/1023/t/759979

    I can capture data through LVDS by running the script while running the project

    Is there anything I've done wrong or any step I missed cause I can't get any LVDS output while using more than 1 sessionCfg.u.swCfg.userBufferInfo

    Please help me figure this out, thanks alot

  • "I can get data with 1 gSwUserBuffer through LVDS while SRR demo is running, but while I added another gSwUserBuffer , I can't get any LVDS data output to my PC"

    Does this mean that in the code you quoted, you have info[0] which used to be HSI header but is replaced by SwUserBuffer and with index[1] not populated (size and address 0), it worked? If this worked, then no good reason why the additional info[1] also populated would not work. But in your above statement if you meant the case with HSI + 1 user buffer worked, then when you replace the HSI header, you will need to use raw mode in the DCA capture. You can also retain the HSI header with two user buffers in addition because CBUFF allows up to 3 user buffers but if you want to do this, then you will have to change #define MMWDEMO_LVDS_STREAM_SW_SESSION_MAX_EDMA_CHANNEL from 2 to 3 in the code and provision for additional edma resource in the MmwDemo_LVDSStream_EDMAInit function i.e add Table[2] entry [presently only table[0] and table[1]) with additional available EDMA resources.
  • Piyush_ said:

    You can also retain the HSI header with two user buffers in addition because CBUFF allows up to 3 user buffers but if you want to do this, then you will have to change#defineMMWDEMO_LVDS_STREAM_SW_SESSION_MAX_EDMA_CHANNEL from 2 to 3 in the code and provision for additional edma resource in the MmwDemo_LVDSStream_EDMAInit function i.e add Table[2] entry [presently only table[0] and table[1]) with additional available EDMA resources.

    Hi Piyush,

    The code I am modifying is SRR Demo (TIDEP-0092), not like the OOB Demo, there are no HSI header and HW session configuration, there are also no #define MMWDEMO_LVDS_STREAM_SW_SESSION_MAX_EDMA_CHANNEL and MmwDemo_LVDSStream_EDMAInit function.

    In mss_main.c : SRR_MSS_configureStreaming(), the initial code of the sw session configuration is like the picture below, and the LVDS output works fine.

    I have confirmed if I add another info but set the size and address to 0, data of Info[0] output through LVDS still works fine

    sessionCfg.u.swCfg.userBufferInfo[1].size = 0;

    sessionCfg.u.swCfg.userBufferInfo[1].address= 0;

    But while I give Info[1] a size and address like the picture below, 

    There won't be any LVDS output to my PC, not even the data in Info[0] that can be output while the size and address of Info[1] is set to 0

    hope you can help me figure out how to use sessionCfg.u.swCfg.userBufferInfo[1] and [2]

    thanks a lot!

  • I looked at the SRR demo code (generally I don't support it but just to examine the code with respect to lvds, I cannot support to the level of running it/recreating the problem for you), what I see is that the allocator SRR_MSS_EDMAAllocateCBUFFChannel is only able to allocate one (first) channel, so it is not implemented to support 2 (or 3) buffers and the allocator is therefore simplified compared to oob demo. When you create CBUFF session, it calls the allocator you have supplied to obtain newer channel resources for each buffer but the present allocator does not track (say with an index) how many attempts were made so it keeps returning the same channels which will mess it up. If you change the SRR allocator to return an error (negative return value) when attempt is made beyond the first allocation [2nd and subsequent calls to the allocator which (the 2nd one) will happen corresponding to info[1]] then the CBUFF session creation will return an error and you would have seen the last System_printf message message in your post. As I said, the SRR allocator is simplified for the one buffer it is trying to stream out.

    If you want to support 2nd buffer you will need to change the allocator, you can refer to the oob demo's allocator for reference and try to mimic what is needed for the 2nd buffer, then it should work.