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.

Interrupt of sensors causes bluetooth disconnect

Other Parts Discussed in Thread: MSP430F5438A

Hi all,

We are working on a custom PCB design that uses the PAN1326 chip. We use the Bluetopia stack and we are using the Bluetooth classic protocol. We have connected the CTS and RTS on P2.3 and P2.4 (we are using the MSP5438A as MCU). 

We have buttons, and sensors on the other pins of P2 and P1, these can cause interrupts. When we have no other interrupts the communication is fine, we send a message and get a ack message back, this messages are made up of a couple of bytes (32).

We also use Led's on I2C busses but when a the LED's flashes and we receive data from the Bluetooth then there connection is lost. The SPP callback gets a remote close port event, but we don't close the port. This also happens when we pressed the buttons (that triggers a interrupt on port 2.

Does anybody have a idea what the problem might be? All tips and feedback are welcome!

  • Hi Roy,

    Which example did you take as a baseline? Perhaps you may want to have a look at the KeyFob demo app. It seems to be very close to what you are doing.

    Regards,

    Miguel

  • Hi Miguel,

    Thank you for your reply! After looking at the KeyFob demo i saw that this was a SPP-LE demo. We use the SPP clasic demo(SPP demo). With this protocol (classic spp) can we use interrupts from other devices or is this not advised. We keep getting a disconnect, or we failed to get a message back from the other device (android device). 

    When the connection fails we can still send data from our pcb(that has Bluetopia and the PAN1326) and this data is received on the smartphone. But when sending data back from the android device it is failed. (the spp callback funciton is not called.

    Do you have any idea? Any feedback is welcome!

  • Hi,

    You have mentioned that you have connected the CTS and RTS on P2.3 and P2.4 of MSP430F5438A and If I understand correctly your have written your own application, Right?

    have you changed the HAL.c, HAL.h and HRDWCFG.h as per the "Hardware Porting Guidelines.pdf"? Provided in Documentation folder as part of the SDK release?
    Are you using the latest SDK?

    After changing this pin settings have you tried any Demos which are provided by default, are they working? If not then there is something wrong with your configuration.
    As you are using the MSP430F5438A? You can try with the default settings, Port1 bit 3 and 4 for CTS and RTS as in msp430_experimentor\hardware\msp430_exp5438\HRDWCFG.h

  • Hi Sundeep,

    We had already checked the porting guide and everything seems oke. We had found the error, a other component was creating undifined behaviour after fixing this the bluetooth code worked like a charm! Thank you for your answer. I will click on answerd by your reply beacuse your sugestion is the starting point of futher possible problems.