Hi there. I am using an NRF52832 target and have configuration code in my target image which sets up the SWO port to run at 4 MHz (CPU @ 64 MHz). I would like to use my Segger J-Link Base and the jLinkSWOViewerCL command-line application (JLink_V632a) to view the SWO output from the board: I do not want jLinkSWOViewerCL to configure my target hardware at all, I just want it to view the SWO output from the target HW as I have already configured it.
I have tried various combinations of command line options but I cannot make jLinkSWOViewerCL simply read the output: it always wants to configure the target and figure out an SWO frequency for itself and I can't make it stop doing that.
Is there a way?
In case it is of interest, this is the target code that configures the SWO output (it is an mbed-os environment):
Display All
I have tried various combinations of command line options but I cannot make jLinkSWOViewerCL simply read the output: it always wants to configure the target and figure out an SWO frequency for itself and I can't make it stop doing that.
Is there a way?
In case it is of interest, this is the target code that configures the SWO output (it is an mbed-os environment):
Source Code
- /* SWO frequency: 4000 kHz */
- void itm_init(void)
- {
- /* Enable SWO trace functionality */
- CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
- NRF_CLOCK->TRACECONFIG |= CLOCK_TRACECONFIG_TRACEMUX_Serial << CLOCK_TRACECONFIG_TRACEMUX_Pos;
- /* set SWO clock speed to 4 MHz */
- NRF_CLOCK->TRACECONFIG = (NRF_CLOCK->TRACECONFIG & ~CLOCK_TRACECONFIG_TRACEPORTSPEED_Msk) |
- (CLOCK_TRACECONFIG_TRACEPORTSPEED_4MHz << CLOCK_TRACECONFIG_TRACEPORTSPEED_Pos);
- /* set SWO pin */
- NRF_P0->PIN_CNF[18] = (GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos) |
- (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) |
- (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos);
- /* set prescaler */
- TPI->ACPR = 0;
- }