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.

Problem to Open SPP Port when firmware run from 0x20000

Other Parts Discussed in Thread: TM4C123GH6PM, TM4C123GH6PGE

I get an Error on open an Bluetooth SPP Port when the Firmware not starts from Flash adress 0x00.

For bootloader I must run the Firmware from higher adress.

And then comes an Hard Fault:

"UNDEFINSTR"

"FORCED"

"BKPT"

I found out, that the Error causes in the Funktion:

"BSC_SearchGenericListEntry".

In the assamply code I see it causes in the follow lines:

MOV r2, r7

MOV r0, r8

BL.W 0x00023960

cmp r0, #0x00

Before the Error comes I call the function "SPP_Open_Remote_Port".

This function returns OK.

But the Event "etPort_Open_Indication" never comes.

There comes the HardFault-Handler before.

The error occures EVERY TIME, when I run the firmware from flash-Adress 0x20000.

I use an TM4C123GH6PM Controller

And an CC256XB BT-Chip.

And an Keil Compiler.

 

Thanks

Ronald

  • Hi,

    Can you please clarify a bit more about "firmware run from 0x20000" so I can try on my setup?

    Regards,
    Gigi Joseph.
  • I work with keil Compiler.

    There I can put the area from the Firmware to 0x020000.

    I go to "Options for Target" There are IROM1.

    I put the Start to 0x20000 and Size to 0x20000.

    Under "Linker" I set the flag for "Use Memory Layout from Target Dialog".

  • Hi,

    Can you confirm the below settings?



    I did not seem to have an issue with the above (TM4C123GH6PGE + CC2564B running "SPPDemo" app):

    ***

    OpenStack().
    HCI_VS_InitializeAfterHCIReset
    VS_Update_UART_Baud_Rate success.
    HCI_VS_InitializeAfterHCIReset Success
    Bluetooth Stack ID: 1
    Device Chipset: 4.1
    BD_ADDR: 0x0017e9505f95

    ******************************************************************
    * Command Options: Server, Client, Help *
    ******************************************************************

    Choose Mode>Client

    ******************************************************************
    * Command Options: Inquiry, DisplayInquiryList, Pair, *
    * EndPairing, PINCodeResponse, PassKeyResponse, *
    * UserConfirmationResponse, *
    * SetDiscoverabilityMode, SetConnectabilityMode,*
    * SetPairabilityMode, *
    * ChangeSimplePairingParameters, *
    * GetLocalAddress, GetLocalName, SetLocalName, *
    * GetClassOfDevice, SetClassOfDevice, *
    * GetRemoteName, SniffMode, ExitSniffMode, *
    * Open, Close, Read, Write, *
    * GetConfigParams, SetConfigParams, *
    * GetQueueParams, SetQueueParams, *
    * Loopback, DisplayRawModeData, *
    * AutomaticReadMode, SetBaudRate, Send *
    * Help, Quit *
    ******************************************************************

    Client>Inquiry

    Client>
    Inquiry Entry: 0xc0eefb312cbd.

    Client>
    Result: 1,0xc0eefb312cbd.

    Client>Open 1 1

    SPP_Open_Remote_Port success.

    Client>
    SPP Open Confirmation, ID: 0x0001, Status 0x0002.

    ***

    Regards,
    Gigi Joseph.

  • Thanks, it was my fault.

  • Hi,

    Thanks for the update, I will mark this as closed.
    For the benefit of others, can you tell us what the problem was?

    Regards,
    Gigi Joseph.
  • I use the space from 0x30000 as EEPROM-Storage and overwrite the stack with the BT-Adress from the found Bluetooth devices.

    This was the reason, why I can not open the port after found devices.