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.

LAUNCHXL-CC1352R1: Portable example with 15.4 Sensor_OAD

Part Number: LAUNCHXL-CC1352R1
Other Parts Discussed in Thread: Z-STACK

Hello, 
I am using SDK 2.30.00.45 . I tried the following example, 

dev.ti.com/.../154-stack_02_portable_app_remote_sensor.html 

I performed only Task 2 (Combine the portable app with TI 15.4 stack) with 15.4 Sensor and it worked fine.

But when I tried the same thing with 15.4 Sensor_OAD example the build didn't give any error but the terminal didn't display anything.

Can we mix the Portable app example in any code or is it specifically meant to support just the Sensor example?

Thanks and Regards,
Yash.



  • Hi Yash,

    Did you flash the device with the BIM project before flashing the Sensor_OAD example?
  • Hello Severin Suveren,

    First of all thank you for your quick response.
    Answering your question,
    Yes, I flashed the BIM project before Sensor_OAD.
    I even tried the same with a project from Z-Stack (Zed_Doorlock) , and the there was no display in that too.

    Thanks,
    Yash.
  • What happens when you debug the application? Do you enter the main() procedure of your OAD_Sensor application?
  • Yes, the flow goes into the main() procedure of the Sensor_OAD application.
    It steps into "main_app()" function, and it gets stuck in the following line:
    retc = pthread_create(&thread, &attrs, temperatureThread, NULL); // line number 103.

    Stepping into the function the flow is redirected to the pthread.c file.
    and the control is stuck more specifically in the
    thread->task = Task_create((Task_FuncPtr)_pthread_runStub,&taskParams, &eb); //line number 334
    in pthread.c file.

    Thanks and Regards,
    Yash.
  • When debugging and the application hangs, could you open ROV and scan for BIOS errors?

  • Hi,

    I opened ROV and scanned for BIOS error as you suggested. Please refer the following screenshots -


    While the code gets stuck on the selected line the ROV error message(also seen in the above screenshot) reads this - 

    All ROV views have been run and no errors were encountered. In BIOS, this includes a check of the System stack usage and all Task stacks.


    But when I pause the debug and run it again it shows this - 

    Quoting the complete error below -

    "Error:Problem fetching Task stack:JavaException: java.lang.Exception:Target memory read failed at address: 0x0, length:1024This read is at an INVALID address according to the application's section map.  The application is likely either uninitialized or corrupt."


    So is the error seen in the 2nd screenshot expected as i clicked on "Suspend" and then pressed the "Play" button again, or is this the error because of which the Sensor_oad application is getting stuck?
    And how to resolve this?

    Thanks and Regards,

    Yash.

  • Could you send me the CCS project so I could take a look at the code?
  • Will you please tell me , should i send it via a personal message or upload to the forum?

    Thanks,
    Yash.
  • You can export the CCS project to a zip file and upload it here if you want.
  • Hi,

    Please find the attached zip file below.

    sensor_oad_cc1352r1lp.zip

    Thanks,

    Yash.

  • Hello Severin Suveren,

    Did you get the time to go through the project?
    Response is awaited. Thank you.

    Regards,
    Yash.
  • Hi Yash,

    I haven't had time to take a look at the code yet, sorry for keeping you waiting. I will have time to look at it Monday next week.
  • No worries.
    Thanks for informing.

    Regards,
    Yash.
  • Ok, so I've taken a look. Without testing it myself, it looks like it could be out-of-heap error. The normal Sensor example configures the heap to be 4500 bytes, while the Sensor OAD example configures the heap to be 4096 bytes. The portable example allocates the pthread stack on the heap, and it could be coincidentally that 4500 was enough but 4096.

    Try to either increase the heap size or instead allocate the stack statically instead on the heap.
  • Hi,

    I didn't get this line - " The portable example allocates the pthread stack on the heap, and it could be coincidentally that 4500 was enough but 4096. " , will you please elaborate? 

    Also as you said i increased the stack size in "Sensor_oad + portable" code. I changed it from 4096 bytes to 4500 bytes. And the terminal is still blank (flashed the BIM first and then the modified project). Can you suggest me what heapsize should i keep?

    Adding one more thing, as you said the normal Sensor example configures the heap to be 4500 bytes, I only found one instance wherein i can change the heap size and that is in app_cfg. The original Sensor code had BIOS.heapSize = 1724, i changed it to BIOS.heapSize = 4096.  And i changed the same variable for heapsize in sensor_oad+portable also (Attaching a screenshot for reference.), so my confusion is where is that 4500 heapsize you said  defined. Are there any more variables i need to modify to change the heap size? 



    Thanks and Regards, 

    Yash.

  • Hello again,

    It worked now.

    After you suggested the heapsize, as i was going through the app.cfg file, I noticed that ROM.romName was commented out in Sensor_oad, whereas it was not commented out in simple sensor example.

    So i changed the heapsize in the "else condition" to 4096 and it worked.
    Thank you for your time and suggestion.

    Regards,
    Yash.