quick question: trace output

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

The trace output comes out of the HCI UART right? It always comes out of the HCI UART irrespective of what's attached to those pins? Is there a way to turn off all trace output or disable the HCI UART so the pins tri-state? (after boot up when the 20737 checks to see if it's meant to go into programming mode.)

0 Likes
1 Solution
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

All traces come out of the ROM (so these cannot be removed, only disabled at runtime) or the application (you have full control of when trace code is included and when it is not).

As far as routing traces elsewhere, you can edit the SPAR_APP_SETUP function to set bleapp_trace_enable variable to BLE_TRACE_UART_PERIPHERAL if needed.

void SPAR_APP_SETUP(void)

  {

     bleapp_pre_init = application_init;

     bleapp_trace_enable = BLE_TRACE_UART_PERIPHERAL; // Change back to

     // BLE_TRACE_UART_HCI

     // to route traces to the HCI UART

  }

View solution in original post

4 Replies
Anonymous
Not applicable

Hello paddybatman,

With SDK 2.1, we implemented an encoded tracing mechanism in the ROM to reduce the ROM foot print and to make logging a bit faster. You cannot use a hyperterm like application any more because these traces are encoded. The SDK comes with its own trace parsing plugin that can decode these traces. Use the Trace -> Start Debug Traces menu item in Eclipse to capture traces on the same uart you used to download the application (or use Trace -> Setup COM Port menu to manually set it). Note that you have to Stop Debug Traces before you download the app again or the download will fail.

Thanks

JT

MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

All traces come out of the ROM (so these cannot be removed, only disabled at runtime) or the application (you have full control of when trace code is included and when it is not).

As far as routing traces elsewhere, you can edit the SPAR_APP_SETUP function to set bleapp_trace_enable variable to BLE_TRACE_UART_PERIPHERAL if needed.

void SPAR_APP_SETUP(void)

  {

     bleapp_pre_init = application_init;

     bleapp_trace_enable = BLE_TRACE_UART_PERIPHERAL; // Change back to

     // BLE_TRACE_UART_HCI

     // to route traces to the HCI UART

  }

Anonymous
Not applicable

so just to clarifiy then,

I've a 20737on a board with another micro. I'll program the 20737 via the other micro. Once the 20737 is programmed the pins from the micro that are attached to the HCI Uart are also connected to a different device on the board.

I should be able to control everything so that at turn on the 20737 doesn't go into programming mode, but, when in application mode, if the 20737 automatically outputstrace data from the HCI Uart pins it'll interfere with the operation of the other device.

If I'm understanding you correctly, in application mode, the UCI Uart doesn't drive any trace data out unless it's instructed to.

0 Likes

Your understanding seems to coincide with the Quick Start Guide, which requires that one of the dip switches (2) on SW4 be set to off in order to enable traces.

Of course in production it is always best to disable all traces. Recall that you can do so within your APPLICATION_INIT() function.

Inside of this function, if you set ble_trace_enable = 1, ble_trace* functions will print to the peripheral UART; if you set this to 2 instead, debug traces will go to the HCI UART.

Setting ble_trace_enable = 0 instead will disable trace messages.

0 Likes