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.

Compiler/CC2640R2F: I'm having troubles creating a Task with POSIX (pthread) in the main() of simple_peripheral

Genius 9880 points

Part Number: CC2640R2F

Tool/software: TI C/C++ Compiler

Hi Team,

We are from TI customer support and we received inquiry from customer asking for support regarding CC2640R2F device. 

The customer have troubles creating a Task with POSIX (pthread) in the main() of simple_peripheral. When try to debug, it stays there and does not enter the thread created with POSIX.

Please see attached project file: CS0306031_CC2640R2F_project

(With regards to the file, it will be forwarded directly which expert will be handling this by Mr. Evan)

Customer query: These would all the files created/edited in the simple_peripheral project. I would focus in the POSIX thread created in main.c I would also recall that if I comment GAPROLE and ICALL_createRemote the pthread works, else not. However I need the GAPROLE and ICALL for the BLE communication through SimplePeripheral Task."

Thank you and looking forward for your kind response.

Regards,

Maynard

 

  • Hi Maynard,

    I will assign an expert to assist you.

    In the mean time I would suggest to review our SimpleLink Academy and our documentation.

    Best regards,

  • Maynard,

    Without any source code information it is quite difficult to make an assessment of what may be wrong with the customer's project. In this case, I would strongly follow Clemens' suggestion to point the customer to the SimpleLink Academy and to our RTOS documentation. Also, there is a POSIX Project Zero module that may also be of help in this porting.

    Regards,

    Rafael

  • Hi Team, 

    Apologies for the late response. I just received information from the customer. For me to not miss information, I'll copy the query below.

    "I basically want to integrate the bmi160 sensor into the simple_peripheral project and then save the data into the flash memory. There is an example project of the bmi160 in which I can read the data of the sensor. However when I try to integrate this bmi160 example project into the simple_peripheral project it does not work. I tried to integrate it in an POSIX and in a TI-RTOS way (following the tutorials and documentation available in TI website) but does not work. Commenting completelly the simple_peripheral Task, GAPRole_createTask() and ICall_createRemoteTasks() allows the program to work. This would be basically the same as having the bmi160 example project. I've been asking for specific problems that could be the reason of this "incompatibility" between bmi160 project example and simple_peripheral, but suggestions of reading documentations does not help, since I read and tried all the documentation.

    someone has done it, I would be glad to know which steps did he took in order to accomplish the integration of the bmi160 with the simple_peripheral."

    Thank you and looking forward for your kind response.

    Regards,

    Maynard

  • Hi Team, 

    I received additional information from our customer. 

    I'm sending screenshots of the problem to give more information...

    I basically want to integrate the bmi160 sensor into the simple_peripheral project and then save the data into the flash memory. There is an example project of the bmi160 in which I can read the data of the sensor. However when I try to integrate this bmi160 example project into the simple_peripheral project it does not work. I tried to integrate it in an POSIX and in a TI-RTOS way (following the tutorials and documentation available in TI website) but does not work. Commenting completelly the simple_peripheral Task, GAPRole_createTask() and ICall_createRemoteTasks() allows the program to work. This would be basically the same as having the bmi160 example project. I've been asking for specific problems that could be the reason of this "incompatibility" between bmi160 project example and simple_peripheral, but suggestions of reading documentations does not help, since I read and tried all the documentation.

    Thank you and looking forward for your response.

    Regards,

    Maynard

    screenshot_1.zip

  • Maynard,

    I also apologize for the delay.

    The screenshots you sent indicate there is a stack overflow on the thread, but that may be an artifact of the thread that was terminated anyways - was this something looked upon? Perhaps increase the task stack used by the bmi160 thread? At any rate, is there any additional data on what is exactly not working?

    From the information provided I can't pinpoint an exact root cause for the joined project to fail. I haven't seen a procedure that specifically integrates the two projects, thus I don't have much else to suggest at this time, apart from the stack remark above and any possible conflicting resources (the BMI uses an extra GPIO and the UART).

    I will try to find additional resources and report back to this thread in case I find anything.

    Regards,

    Rafael