Other Parts Discussed in Thread: MSP432E401Y, CC2564C
Good afternoon.
We are facing a few challenges trying to use Bluetopia Bluetooth stack in our project. We are using custom hardware based on MSP432E401Y MCU Rev.B and CC2564MODA Rev1.0. We are basing our tests on the SPPDemo supplied by the stack. Since the example is based on MSP432P401R, we had to update some code for our MCU. The only files we updated are:
- Bluetopia/hcitrans/HCITrans.c
- Platforms/MSP-EXP432P401R/HAL.c
- Platforms/MSP-EXP432P401R/HAL.h
- Platforms/MSP-EXP432P401R/HRDWCFG.h
The main changes were direct conversions of MSP432P401R functions to MSP432E401Y driverlib functions. We are able to communicate with the CC2564MODA via UART and send the HCI_RESET (0x01 0x03 0x0C 0x00) command using HCI Transport Layer function HCITR_COMWrite. We successfully receive a valid response from CC2564MODA which is a Command Complete Event (0x04 0x0E 0x04 0x01 0x03 0x0C 0x00). The received data is successfully stored inside the UARTContext.RxBuffer and passed to _COMDataCallback by HCITR_COMProcess. However, after we pass all seven bytes to the upper layer, the function HCITR_COMClose is called and BSC_Initialize returns BTPS_ERROR_HCI_INITIALIZATION_ERROR (-4). We confirmed that the data is sent correctly to the upper layer in the correct order and that the callback is called correctly, via dissassembly debug.
We do not understand why the stack fails to process the data and continue with the initialization procedure. We are out of ideas on how to approach this problem. We also used the CC256X_Logger for debug but it only logs data until the HCI_Reset is processed. I'll leave a screenshot of the logger and the HCITR_COMProcess and HCI UART RX ISR. The HCI UART is configured with HW Flow Control and 115200 baud rate. On the oscilloscope all the data is correctly visualized.
The is also what seems to be a strange behaviour from the stack. After _COMDataCallback is called with the last byte(s) the address to which it points changes to 0x00000000. Is this the expected behaviour. Before it was pointing to HCITR_COMDataCallback_UART (0x000047DF). Because of this, when HCITR_COMClose is called the callback is no longer called on the following lines:
/* All finished, perform the callback to let the upper layer know */
/* that this module will no longer issue data callbacks and is */
/* completely cleaned up. */
if(COMDataCallback)
(*COMDataCallback)(HCITransportID, 0, NULL, CallbackParameter);
We have other questions that can interfere on the way the stack works. We noticed that the stack comes with the file CC256XB.h from 2015. We downloaded the Service pack 1.8 that comes with the same file but dated 2017. We are using the new one but it still does not solved the issues. Are we right to assume that we should used the file CC256XB.h instead of CC256X.h for our CC2564MODA?
We also read on some forum posts that we could convert the BTS files to .H files with BHET tool but it seems to be unavailable for download. We can only subscribe to alerts.
Is it possible that we are missing any project configuration or file? We are using Code Composer Studio 10.1.1.00004 to compile and run the project.
We already spent several weeks stuck on this problem. We really need some input on your side.
Thank you very much for the support.