Hello,
I am working with the TI CC2540 chip and am attempting to control a motor based on inputs from two optocouplers and a mobile phone. I just modified the default SimpleBLEPeripheral code by adding some constants, variables and events. The idea is to periodically (every 30s) check if the current position of the motor is different to the desired position. If it is, then a for loop calls a while loop to bring the motor position to its desired place. The desired position is sent from the phone. The motor only moves (homes to zero first then moves onto desired position) after the desired position is received from the phone.
The problem is that when I send the desired position from the phone, the motor homes properly. But when it starts moving onto the desired position, the device chip stops advertising and thereafter is non discoverable by any phone. This is quite strange as I have built the application on SimpleBLEPeripheral with infinte advertising and have changed nothing related to GAP or GATT. I only added 12 characteristics to SimpleGATTProfile. I have also checked the memory map (attached) and it seems ok. Can anyone please help me figure this non advertising problem out?
Thanks