Hi there,
I am trying to read data from the accelerometer and send it over the Bluetooth connection. For this i have modified the SPPdemo sendData procedure to use the buffer where I am writing using interrupts the data from the accelerometer. this happens 100 times per second and I read and add to the buffer 3 values, x,y,z, a byte each, in a very quick interrupt service routine and store them in the buffer.
However, when the interrupts are enabled the sending is very unstable and after a few bytes it breaks altogether .Nothing except restart cannot recover the connection. When the interrupts from the accelerometer are disabled everything works fine and I am able to send millions of bytes stored in the buffer.
I am wondering how the interrupts are breaking the bluetopia stack.
I noticed that I am getting ??? on the ez430 console shortly before the sending breaks. i suppose that they are coming from the implementation of SPP_data_Write but could't find any information on this.
I have tried with and without LPM3_EXIT but it does not make any difference so I assume it must be something else
Can anyone suggest what to do to avoid breaking the sending of data while getting interrupts and reading accelerometer data?
Thanks
Al