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: Modify the size of gSwUserBuffer in SRR demo(TIDEP-0092)

Part Number: AWR1642BOOST
Other Parts Discussed in Thread: DCA1000EVM

Tool/software: Code Composer Studio

Hi all,

I have modify the SRR code and I am able to output some data through LVDS and DCA1000 to my PC while running the demo

1. My question is that what is the size limit of array gSwUserBuffer in mss_main.c ?

I can change the size of the array from volatile uint16_t gSwUserBuffer[2048] to volatile uint16_t gSwUserBuffer[4096] And it works fine I can get the amount of data I want

But however when I change the size to volatile uint16_t gSwUserBuffer[8192] I can’t even run the demo, opening the GUI will have a error saying that I can’t open the COM port while the COM port is normal with the array size 2048 and 4096

is there any way I am able to set the array to gSwUserBuffer[8192] ?

2. The second quesion is how to calculate sizeof(gSwUserBuffer)?

in mss_main.c:SRR_MSS_configureStreaming(), sessionCfg.u.swCfg.userBufferInfo[0].size = sizeof(gSwUserBuffer)/2;

while volatile uint16_t gSwUserBuffer[2048] 

in my concept the array size should be 2048 * 2 Bytes = 4096 Bytes

but when the sessionCfg.u.swCfg.userBufferInfo[0].size is set as sizeof(gSwUserBuffer)/2, I will get a data of size 4096 Bytes per frame, shouldn't it be 4096/2 = 2048 Bytes?

I have the problem above because I wish to send out 32KB of Data per frame

Since the size of gSwUserBuffer[2048]/2 is 4096 , so the size of gSwUserBuffer[8192] will be 32KB and it will be able to output the amount of data I need

Or is there any way I can try to output 32KB of data per mailbox read?

  • Hi

    Can you please share with us what sw you use on the PC to capture the LVDS data?

    Thank you

    Cesar

  • Note: my comments below are based on oob demo, I am assuming that the LVDS part of oob demo was carried in the SRR demo. [I do not officially support SRR demo]

    #1, #2: The CBUFF unit dictates the maximum size which is 0x3FFF CBUFF units. 1 cbuff unit = 2 bytes. So maximum user buffer size you can transmit (including header sizes) is 32766 bytes. The division by 2 is to convert bytes (sizeof()) to CBUFF units. Your uint16_t x[8192] will be a size of 16384 bytes or 8192 CBUFF units which is below the limit so should not have given any problems, we have not tried this large size ourselves, so you will have to spend some time to debug why you see COM port failure. The COM port failure does not make sense, perhaps the large buffer is producing is exposing some problem due to memory map shift [this is pure speculation at this point]. You express your intent of sending 32KB = 32768 bytes [uint16_t x[16384]) which exceeds the CBUFF limit, so if you attempted to do this, the CBUFF driver will give you an error [see code CBUFF_validateBufferCfg in cbuff driver]. Assuming application code is acting on error (i.e not ignoring it), you will see that violation reported by your application.

    If you want to send more than CBUFF limit, you can a) Add another user buffer [max number of user buffers supported is 3 in the driver] and give half your buffer in one user buffer and half in the other one [assuming each half obeys the limit] or b) you can terminate and re-create s/w session (in each frame) to send the big buffer in parts. We have ourselves not tried any of these so we cannot say for certain you will not hit any issues but you can give it a try.

  • Hi Cesar,
    I use DCA1000EVM with mmwavestudio and run a lua script to capture the LVDS data while the SRR demo is running
  • Piyush_ said:


    You express your intent of sending 32KB = 32768 bytes [uint16_t x[16384]) which exceeds the CBUFF limit, so if you attempted to do this, the CBUFF driver will give you an error [see code CBUFF_validateBufferCfg in cbuff driver]. Assuming application code is acting on error (i.e not ignoring it), you will see that violation reported by your application.



    Hi Piyush,

    I now understand the meaning why the size of the buffer info is half of sizeof(gSwUserBuffer)


    and after confirm uint16_t gSwUserBuffer[0x3FFF] with sessionCfg.u.swCfg.userBufferInfo[0].size = sizeof(gSwUserBuffer)/2; it works properly
    while uint16_t gSwUserBuffer[0x4000] with sessionCfg.u.swCfg.userBufferInfo[0].size = sizeof(gSwUserBuffer)/2; COM port of my UART can't be found.


    So let me confirm this, the max amount of CBUFF data units I can transfer per mss_main.c:SRR_MSS_configureStreaming() is 0x3FFF * 3,that is equal to 0x3FFF * 3 * 2Bytes, but I have to use sessionCfg.u.swCfg.userBufferInfo[0],sessionCfg.u.swCfg.userBufferInfo[1] and sessionCfg.u.swCfg.userBufferInfo[2] with each max CBUFF data unit 0x3FFFF
    am I right about the understanding above?

  • Your understanding is correct.