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.

CC2564MODA: We are stuck at the HCI_Reset function (int BTPSAPI HCI_Reset(unsigned int BluetoothStackID, Byte_t *StatusResult)

Part Number: CC2564MODA

Hi ,

We have the CC2564MODA on our board and it started working (Logger file attached), We are working in UART cp3Wire mode, Currently we are stuck at the HCI_Reset function (int BTPSAPI HCI_Reset(unsigned int BluetoothStackID, Byte_t *StatusResult) file HCI.c, returning BTPS_ERROR_DEVICE_RESET_ERROR; we have started checking why we are getting the error and it looks as the flag  HCI_CONTEXT_FLAGS_SYNCHRONOUS_HCI_FLAG is not set when we check it in the function HCISendPacket,

Any idea why this is happening maybe we are not setting/initialize some flags?

Please let me know if any other info. is needed,

Many Thanks

Loger Text

106    2    05/30/19 10:44:23.061   +0:00:00.000    BT Logger 1            uart_hci parameters: UartDIV=4, OS=17, SP=63, MoB=7                                                    
107    2    05/30/19 10:44:23.061   +0:00:00.000    BT Logger 1            temperature sensing: temp 26, read 0x20, vbe 0x2873319, slope 0x1f829                                                    
108    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Temperature region = 6                                                    
109    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            In lc_rf_init_periodic_calibration                                                    
110    5    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            synch event REG received, module RF_CALIBRATION, msi 0                                                    
111    5    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            synch cmd start instance, module RF_CALIBRATION, msi: 0                                                    
112    5    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            synch cmd return event STARTED,module RF_CALIBRATION                                                    
113    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            ORCA Platform                                                    
114    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Process type: Nominal                                                    
115    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Chip revision: 6                                                    
116    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Detected Clock = 38400000 Hz                                                    
117    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Ref Clock = 38400000 Hz                                                    
118    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            XTAL wakeup mode  is disabled                                                    
119    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Ref Clock is valid for PLL                                                    
120    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            PLL Clock Output is OK                                                    
121    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            PLL Clock Out = 40000000 Hz                                                    
122    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Clock Working mode: PLL Mode                                                    
123    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            ARM Clock = 40000000 Hz, Slow Clock: External                                                    
124    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            OCP Clock = 8000000 Hz                                                    
125    4    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            UART HCI baudrate = 116363                                                    
126    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Gemini type Soft Gemini                                                    
127    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            lm_lc_get_local_features                                                    
128    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            lm_lc_set_brcst_retran                                                    
129    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            lm_lc_self_test_run_init_tests                                                    
130    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Self Test passed                                                    
131    4    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            I2C doesn't exist !                                                    
132    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            lm_lc_get_local_bd_addr                                                    
133    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Software version - 7.0.16                                                    
134    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Deactivating timer: init                                                    
135    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            lm_lc_rf_periodic_calibration                                                    
136    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            Calibration started. Vector=0x1, 0x0                                                    
137    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            PHY FW Version 3.27                                                    
138    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            random 0x0 0x9a1f                                                    
139    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            random 0x2746 0x95b4                                                    
140    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            random 0x98f9 0xf55                                                    
141    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            random 0x7116 0x3be0                                                    
142    2    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            random 0xa7e5 0xae71                                                    
143    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            lm_lc_generate_rand                                                    
144    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            lm_lc_generate_rand                                                    
145    5    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            synch event FINISH received, module RF_CALIBRATION, msi 0                                                    
146    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            lm_lc_generate_rand                                                    
147    3    05/30/19 10:44:23.076   +0:00:00.015    BT Logger 1            lm_lc_generate_rand                                                    
148    4    05/30/19 10:44:25.931   +0:00:02.870    BT Logger 1            Transport detection: UART detected                                                    
149    3    05/30/19 10:44:25.931   +0:00:02.870    BT Logger 1            first byte recevied C0                                                    
150    3    05/30/19 10:44:25.931   +0:00:02.870    BT Logger 1            Disable FLIGHT MODE - Enable TX calibration                                                    
151    4    05/30/19 10:44:25.931   +0:00:02.870    BT Logger 1            Uart Active Protocol: H5 PROTOCOL                                                    
152    4    05/30/19 10:44:50.782   +0:00:27.721    BT Logger 1            H5 RX, Receive msg SYNC                                                    
153    4    05/30/19 10:44:50.782   +0:00:27.721    BT Logger 1            H5 TX, send msg SYNC_RESPONSE                                                    
154    4    05/30/19 10:44:50.782   +0:00:27.721    BT Logger 1            H5 TX, send msg SYNC                                                    
155    7    05/30/19 10:44:51.203   +0:00:28.142    BT Logger 1            *** WARNING *** H5 TX, retransmit lc_msg                                                     
156    4    05/30/19 10:44:51.203   +0:00:28.142    BT Logger 1            H5 TX, send msg SYNC                                                    
157    7    05/30/19 10:44:51.609   +0:00:28.548    BT Logger 1            *** WARNING *** H5 TX, retransmit lc_msg                                                     
158    4    05/30/19 10:44:51.609   +0:00:28.548    BT Logger 1            H5 TX, send msg SYNC               

  • Ofer,

    Traces 106 to 147 in the text above indicate that the CC256xB was powered up correctly. In other words, the power-up sequence explained in the datasheet was followed in enabling the controller.

    Traces 148 and 150 indicate that the host is using the H5 protocol (3 wire UART transport from BT spec). Is this intentional? Generally, most systems would use H4 protocol for UART transport that uses hardware flow control.

    Besides this, I do not see a HCI_Reset command being received on the controller from the host side. So it is likely that there is some problem in the HCI UART driver on the host side. Which host stack is being used in this system?

    Best regards,

    Vihang

  • Hi Vihang,

     

    Thank you !

     

    Yes we are using the H5 protocol (3 wire UART transport from BT spec),

     

    What could be the issues in the HCI UART? any settings maby missing? can we get a correct logger to see what could the problem be? 

     

    I have attached the BTPSCFGI,h and BTPSCFG,h file is there something that we should change in the configuration settings?

     

    The host stack is v4.1

     

    Many Thanks

    BTPSCFGI.hBTPSCFG.h

  • Hi Vihang,

     

    Thank you !

     

    Yes we are using the H5 protocol (3 wire UART transport from BT spec),

     

    What could be the issues in the HCI UART? any settings maby missing? can we get a correct logger to see what could the problem be? 

     

    I have attached the BTPSCFGI,h and BTPSCFG,h file is there something that we should change in the configuration settings?

     

    The host stack is v4.1

     

    Many Thanks

    BTPSCFGI.h4442.BTPSCFG.h0333.BTPSCFGI.h.h

  • Ofer,

    From the BTPSCFG.h file name, it appears that you are using the TI dual-mode BT stack or a version of it that is ported for a different host. If that is the case, I would recommend first checking if the H4 mode works correctly with one of the sample applications in the stack SDK. Once that is working, the only code change required to switch to H5 would be changing the HCI driver configuration in the main application initialization.

    e.g. 
    
    Replace 
       	/* Configure the UART Parameters.                                    */
    	HCI_DRIVER_SET_COMM_INFORMATION(&HCI_DriverInformation, 1, VENDOR_BAUD_RATE, cpHCILL_RTS_CTS);
    with
    	/* Configure the UART Parameters.                                    */
    	HCI_DRIVER_SET_COMM_INFORMATION(&HCI_DriverInformation, 1, VENDOR_BAUD_RATE, cp3Wire);
    

    Ofer Melman76748 said:
    What could be the issues in the HCI UART? any settings maby missing?

    If this is a custom stack release or the standard release ported for some other MCU, the problem might actually be in the HAL and HCITRANS port itself.

    Best regards,

    Vihang

  • Hello Vihang,

    We have the UART starting working we had issues with the HCITR_COMProcess (Receiving) and HCITR_COMWrite (transmit) functions, in the logger we are getting an error - "Error RX, Got unexpected LC msg and ignore it, state=uninit, msg=CONFIG, slp_state=0" what does it mean? where can we find the uart message structure and messages type? do you have maybe a correct H% logger so we can compare,

    logger05_s.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    1 07/04/19 12:58:33.219 +0:00:00.000 uart_hci parameters: UartDIV=4, OS=17, SP=63, MoB=7
    2 07/04/19 12:58:33.219 +0:00:00.000 temperature sensing: temp 26, read 0x20, vbe 0x2873319, slope 0x1f829
    3 07/04/19 12:58:33.219 +0:00:00.000 Temperature region = 6
    4 07/04/19 12:58:33.219 +0:00:00.000 In lc_rf_init_periodic_calibration
    5 07/04/19 12:58:33.219 +0:00:00.000 synch event REG received, module RF_CALIBRATION, msi 0
    6 07/04/19 12:58:33.219 +0:00:00.000 synch cmd start instance, module RF_CALIBRATION, msi: 0
    7 07/04/19 12:58:33.219 +0:00:00.000 synch cmd return event STARTED,module RF_CALIBRATION
    8 07/04/19 12:58:33.219 +0:00:00.000 ORCA Platform
    9 07/04/19 12:58:33.219 +0:00:00.000 Process type: Nominal
    10 07/04/19 12:58:33.219 +0:00:00.000 Chip revision: 6
    11 07/04/19 12:58:33.219 +0:00:00.000 Detected Clock = 38400000 Hz
    12 07/04/19 12:58:33.219 +0:00:00.000 Ref Clock = 38400000 Hz
    13 07/04/19 12:58:33.219 +0:00:00.000 XTAL wakeup mode is disabled
    14 07/04/19 12:58:33.219 +0:00:00.000 Ref Clock is valid for PLL
    15 07/04/19 12:58:33.219 +0:00:00.000 PLL Clock Output is OK
    16 07/04/19 12:58:33.219 +0:00:00.000 PLL Clock Out = 40000000 Hz
    17 07/04/19 12:58:33.219 +0:00:00.000 Clock Working mode: PLL Mode
    18 07/04/19 12:58:33.219 +0:00:00.000 ARM Clock = 40000000 Hz, Slow Clock: External
    19 07/04/19 12:58:33.219 +0:00:00.000 OCP Clock = 8000000 Hz
    20 07/04/19 12:58:33.219 +0:00:00.000 UART HCI baudrate = 116363
    21 07/04/19 12:58:33.219 +0:00:00.000 Gemini type Soft Gemini
    22 07/04/19 12:58:33.219 +0:00:00.000 lm_lc_get_local_features
    23 07/04/19 12:58:33.239 +0:00:00.020 lm_lc_set_brcst_retran
    24 07/04/19 12:58:33.239 +0:00:00.020 lm_lc_self_test_run_init_tests
    25 07/04/19 12:58:33.239 +0:00:00.020 Self Test passed
    26 07/04/19 12:58:33.239 +0:00:00.020 I2C doesn't exist !
    27 07/04/19 12:58:33.239 +0:00:00.020 lm_lc_get_local_bd_addr
    28 07/04/19 12:58:33.239 +0:00:00.020 Software version - 7.0.16
    29 07/04/19 12:58:33.239 +0:00:00.020 Deactivating timer: init
    30 07/04/19 12:58:33.239 +0:00:00.020 lm_lc_rf_periodic_calibration
    31 07/04/19 12:58:33.239 +0:00:00.020 Calibration started. Vector=0x1, 0x0
    32 07/04/19 12:58:33.239 +0:00:00.020 PHY FW Version 3.27
    33 07/04/19 12:58:33.239 +0:00:00.020 random 0x0 0x75ee
    34 07/04/19 12:58:33.239 +0:00:00.020 random 0xb6fd 0xa717
    35 07/04/19 12:58:33.239 +0:00:00.020 random 0x1bb4 0xb7c5
    36 07/04/19 12:58:33.239 +0:00:00.020 random 0xf8cc 0xadd6
    37 07/04/19 12:58:33.239 +0:00:00.020 random 0x8b9 0x696b
    38 07/04/19 12:58:33.239 +0:00:00.020 lm_lc_generate_rand
    39 07/04/19 12:58:33.239 +0:00:00.020 lm_lc_generate_rand
    40 07/04/19 12:58:33.239 +0:00:00.020 synch event FINISH received, module RF_CALIBRATION, msi 0
    41 07/04/19 12:58:33.239 +0:00:00.020 lm_lc_generate_rand
    42 07/04/19 12:58:33.239 +0:00:00.020 lm_lc_generate_rand
    43 07/04/19 12:58:33.379 +0:00:00.160 Transport detection: UART detected
    44 07/04/19 12:58:33.379 +0:00:00.160 first byte recevied C0
    45 07/04/19 12:58:33.379 +0:00:00.160 Disable FLIGHT MODE - Enable TX calibration
    46 07/04/19 12:58:33.379 +0:00:00.160 Uart Active Protocol: H5 PROTOCOL
    47 07/04/19 12:58:33.379 +0:00:00.160 H5 RX, Receive msg SYNC
    48 07/04/19 12:58:33.379 +0:00:00.160 H5 TX, send msg SYNC_RESPONSE
    49 07/04/19 12:58:33.379 +0:00:00.160 H5 TX, send msg SYNC
    50 07/04/19 12:58:33.379 +0:00:00.160 H5 RX, Receive msg SYNC
    51 07/04/19 12:58:33.379 +0:00:00.160 H5 TX, send msg SYNC_RESPONSE
    52 07/04/19 12:58:33.379 +0:00:00.160 H5 TX, send msg SYNC
    53 07/04/19 12:58:33.379 +0:00:00.160 H5 RX, Receive msg SYNC
    54 07/04/19 12:58:33.379 +0:00:00.160 H5 TX, send msg SYNC_RESPONSE
    55 07/04/19 12:58:33.379 +0:00:00.160 H5 TX, send msg SYNC
    56 07/04/19 12:58:33.379 +0:00:00.160 H5 RX, Receive msg CONFIG
    57 07/04/19 12:58:33.379 +0:00:00.160 H5 Error RX, Got unexpected LC msg and ignore it, state=uninit, msg=CONFIG, slp_state=0
    58 07/04/19 12:58:33.379 +0:00:00.160 H5 RX, Receive msg SYNC
    59 07/04/19 12:58:33.379 +0:00:00.160 H5 TX, send msg SYNC_RESPONSE
    60 07/04/19 12:58:33.379 +0:00:00.160 H5 TX, send msg SYNC
    61 07/04/19 12:58:33.379 +0:00:00.160 H5 RX, Receive msg SYNC_RESPONSE
    62 07/04/19 12:58:33.379 +0:00:00.160 H5 RX, Receive msg SYNC
    63 07/04/19 12:58:33.379 +0:00:00.160 H5 TX, send msg SYNC_RESPONSE
    64 07/04/19 12:58:33.379 +0:00:00.160 H5 RX, Receive msg [0x3e02]
    65 07/04/19 12:58:33.379 +0:00:00.160 H5 RX, Receive msg SYNC
    66 07/04/19 12:58:33.379 +0:00:00.160 H5 TX, send msg SYNC_RESPONSE
    67 07/04/19 12:58:33.379 +0:00:00.160 H5 RX, Receive msg SYNC_RESPONSE
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Many Thanks,

    H

  • H,

    Please see the attached example logs for comparison. They were captured on CC2564MODA running the SPPDemo from the SDK, with only change of cp3Wire instead of cpHCILL_RTS_CTS.

    CC2564MODA_init_using_H5.lgr

    From the logger05_s.txt, it appears that you have a bug in Receiving data on the host. The Host sends the SYNC msg that is received by the controller and the controller responds with the SYNC_RESPONSE msg. However, the host keeps re-transmitting the SYNC msg after that as if the HCI drivers never got the SYNC_RESPONSE. 

    BR,

    Vihang