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.

OpenStack() Error -4 on SPPDemo Code with TM4C1230H6PM and CC2654B

Other Parts Discussed in Thread: TM4C1230H6PM, TXS0108E

Hello,

We have the development board TIVA C TM4C123G with the bluetooth Evaluation Module cc256xQFN-EM. We loaded the SPPDemo code and it works perfect.

We copied the same hardware for our custom design using the TM4C1230H6PM controller with CC2654B BLE chip.

We are getting BTPS_ERROR_HCI_INITIALIZATION_ERROR -4 error while execution the "OpenStack()"

I can confirm that the BLE device indicates that the power-up sequence is complete as  BLE RTS goes low. But after about 6secs when this error message "Stack Init Failed: -4. Unable to open the stack." gets printed on console the BLE RTS and nSHUT go HIGH again.

  Also I can see some data on the controller Tx line. But Controller RTS is not low when controller transmits data. I am also not sure of the TM4C1230H6PM controller is able to read the BLE RTS either.

Do i need to make some more change in the code to be able to port it successfully on TM4C1230H6PM controller? ( All i changed is the device name in settings/options menu in Keil Compiler)

Thanks,

Vahbiz

  • Hi,

    Please see the "Documentation\Porting" folder as part of the Bluetopia SDK V1.2
    I hope the IAR(for TM4C123G board) settings have been changed as per section “3.1 Set the Target” from http://www.ti.com/lit/ml/spmu354/spmu354.pdf.

  • Thank you Sandeep for your reply.

    But this issue is not of setting the target! As i have mentioned, this part is done. We have loaded many codes in our custom hardware as well as the TIVA development kit by changing the target name.

    My question here is with respect to BLE i.e. the SPPDemo code or all codes in C\ti\Connectivity\CC256X BT\CC256x M4 Bluetopia SDK\v1.1\Cortex_M4\Sample\

    I am getting "Unable to open the stack." ERROR on my custom board. Our controller RTS pin is constantly HIGH, while in the TIVA board it goes low. UART1 RTS and CTS pins are PF0 and PF1. Why is PF0 (RTS ) not going low on TM4C1230H6PM controller, when is it going low on the development board TIVA C TM4C123G, since i am loading the same code?

    Thanks,

    Vahbiz

  • Hi,

    If OpenStack returns -4 after a long time, it’s because we attempted to send a command to the baseband, and we did not get a reply. This is either because the microcontroller is not sending the command properly, or if it is, it’s not receiving it properly. Or , the chip itself is not initializing properly because it has the wrong patch, so could you put the HCI lines on a logic analyzer to see the actual data going back and forth between the chip?

    You mention that the RTS is high on the chip when the tries sending data. If that is the case you need to make sure the HCITRANS implementation does not attempt to send data if we have been flowed off by the chip, because otherwise it may just toss everything that is sent to it. And could you double check the entire porting as well from the Documentation\Porting" folder?

    Thanks,

    Stonestreet One.

  • Thank you Stonestreet One for your reply. It is very much appreciated and anticipated!

    1.    Yes we had checked the data transmitted by the CPU on a DSO, There are some 3 or 4 byte of data transmitted by the CPU (only once).
    There was no data transmitted by the BLE, so no data received by the CPU. (CPU_RX pin was always HIGH)

    2.    Also we are getting  BTPS_ERROR_HCI_INITIALIZATION_ERROR -4 error after about 5.5sec and after this 5.5 sec the BLE RTS and NSHUT pin are permanently HIGH, even the 26MHz crystal frequency goes off.

    3.    We did not find any Documentation\Porting folder in C:\TI\Connectivity\CC256X BT\CC256x M4 Bluetopia SDK\v1.1\Documentation folder, do you have any particular *.pdf that i could refer to? (I have gone through the http://www.ti.com/lit/ml/spmu354/spmu354.pdf sent by Sandeep.)

    4    Also as you are aware we have the development board TIVA C TM4C123G with the bluetooth Evaluation Module cc256xQFN-EM.

    We connected our custom design using the TM4C1230H6PM controller with bluetooth Evaluation Module cc256xQFN-EM and the software executed successfully. This confirms that there is no issue with the software or the controller TM4C1230H6PM .

    Now we realized that, in the bluetooth Evaluation Module cc256xQFN-EM, the level convertor IC used is SN74AVC4T774RSV, and in our hardware we are using TXS0108E

    SN74AVC4T774RSV : 4-BIT DUAL-SUPPLY BUS TRANSCEIVER WITH CONFIGURABLE VOLTAGE TRANSLATION AND 3-STATE OUTPUTS
    TXS0108E : 8-BIT BIDIRECTIONAL VOLTAGE-LEVEL TRANSLATOR FOR OPEN-DRAIN AND PUSH-PULL APPLICATIONS

    5.    Do you think that this Level Convertor could be the issue as to why our our custom design using the TM4C1230H6PM controller with CC2654B BLE chip is not working?



    Thanks,
    Vahbiz

  • Hello Sandeep,

    Please try to understand, i am well aware that the HCI bus is on 1.8V level and we are using a level convertor "TXS0108E" , which is bring the voltage level down to 1.8V, but it is not the same as SN74AVC4T774RSV.

    We used "TXS0108E" since we needed more channels for voltage level translation.

    Regards,

    Vahbiz

  • Hi,

    I will check it internally and get back to you on this.

    In meanwhile, considering that this level shifter can be used, can be please try provided the slow clock and fast clock externally and see if it makes the different

  • Hi Vahbiz,

    Auto-sense level shifters are not recommended but not sure this is the issue you are facing. Have you verified steps 1 and 3 from the following link: http://processors.wiki.ti.com/index.php/CC256x_Testing_Guide?

    Rgds,

    Miguel

  • Thank you Miguel,

    1. We ordered more of SN74AVC4T774RSV IC and tested it externally. Still same results "BTPS_ERROR_HCI_INITIALIZATION_ERROR -4"

    2. But while checking the signals with Digital Signal Oscillator, we discovered that at "Controller RTS" location when we touch the probe, it started working.

    3. We then connected a 2K2 resistor between "Controller RTS" and ground before the level shifter(on controller 3V3 side). The H4 HCI communication started properly and the BLE stack is executing fine. We were even able to read the temperature from the sensorTAG

    4. Alternately we tested and realized that the level convertor was never the issue. Level convertor "TXS0108E" has no issue.

    Now my questions are :

    1. Why do we need this Pull down at "Controller RTS'?

    2. Is 2k2 Pull Down good enough? Do you suggest to change this value?

    3. Was this there in any reference design, because we never found it in the CC256xQFN-EM design documents? 

    4. Will there be any adverse effects, if we go ahead with this Pull down resistor at "Controller RTS' in our custom design for production?

    Thanks and Regards,

    Vahbiz