Tool/software:
I am currently using the simple_peripheral and simple_central programs to communicate joystick data. I am successfully sending continual data from the peripheral using a task and semaphores. However, when I try this same approach it seems to freeze the the putty window which seems to maybe signal a crash or it looks like it is hitting the abort loop. If I leave the simple_central as is and do a gatt_read pressing the buttons I have successfully read some joystick data. Obviously, I need the GATT_Read to happen continuously. So I tried to use a thread, task, and semaphore as the simple_peripheral sending the data. It seems to crash the program as the putty screen freezes. I thought maybe I need to change the priority to a lower priority, but that did not work. Is there something different I need to do? Is it logical to have continuous calling of Gatt_ReadChar or is there a different approach that needs to be taken? On the simple_peripheral side it uses the thread and semaphore and I'm continually calling SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR5,SIMPLEPROFILE_CHAR5_LEN, &adcValue);
Here is what I was trying in the simple_central
Calling the Gatt_readChar in a thread
and then handling the shifting and reading the adcValue from the SIMPLEPROFILE_CHAR5 characteristic and doing the shifting.
Works like a charm when I do a simple Gatt_read with the button on the board, but seems to bind up and or crash when using it in a thread.
Maybe I need to register with the iCall stuff? Maybe it is crashing, or it is calling the Abort function when I debugged it, as I am calling the Gatt_ReadCharValue from another task/thread and it's not able to communicate with the other thread as it is not registered with iCall?
In that case though, why am I able to call Set_parameter in the simple_peripheral program from another task without any issues?