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.

Bluetopia Stack Transfer Delay

Hi,

I'm trying to solve an issue I'm seeing on my logic analyzer when transferring data.

It seems that every now and then, the SPP interface (or something else in the Bluetooth stack) is hogging 10+ milliseconds worth of time on my system.

I have an interrupt that is firing every 500us from a chip on my board.  Every millisecond, I copy some data from the buffer that is filled by the isr that services the 500us interrupt.

Roughly every 5 milliseconds, I send the data that gets buffered every millisecond.  In general, I'm sending about 324 bytes every 5ms (until this issue occurs).

During execution of the 1 and 5 millisecond timers (these timers are not interrupt driven, so they aren't exact), I set a pin so I can see when they occur on my logic analyzer.

What I'm noticing is that after a while, there are large sections of delay where the system only handles the 500us timer.  If I don't actually transmit the data (i.e. call SPP_Data_Write), then I don't see these delays.  

Is there something the stack is doing that might be causing this delay?

Thanks,

Eric

  • Update:

    Another issue (I believe it is possibly related to the delay mentioned above) I am seeing is that my device eventually resets due to a watchdog timeout.

    I have found that if I remove the call to SPP_Data_Write, my system no longer resets.  I have also determined that when resetting, I am getting a Bus Fault exception with the Instruction Bus error bit set in the Bus Fault Status Register.  I have only been able to get this to occur when I am making a call to SPP_Data_Write.

    I have not yet attempted to recreate this issue in a more isolated environment.

    Eric

  • Hi Eric,

    In HCITrans.c go to the function HCITR_COMWrite routine and change the BTPS_Delay(10) to BTPS_Delay(1) and let us know if you see better performance wrt the delay.

    Best Regards,

    Stonestreet One.