I enable UART or RTT logging in examples, but it can't print in RTT Viewer or PuTTY

I am currently using nrf5280 and nrf5 v17.0.0 SDK, and using ble_app_hrs_rscs_relay example. But neither RTT nor Uart can be used, which side has a problem with the setting

J-Link RTT Viewer use V7.58b & V7.66a and setting below:

UART use PuTTY and Serial speed set 115200

main.c

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
int main(void)
{
uint32_t err_code = NRF_LOG_INIT(NULL);
APP_ERROR_CHECK(err_code);
NRF_LOG_DEFAULT_BACKENDS_INIT();
while(1){
NRF_LOG_INFO("test");
nrf_delay_ms(1000);
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

sdk_config.h #test with RTT

NRF_LOG_BACKEND_RTT_ENABLED 1 , NRF_LOG_BACKEND_UART_ENABLED 0

sdk_config.h #test with RTT

NRF_LOG_BACKEND_RTT_ENABLED 0 , NRF_LOG_BACKEND_UART_ENABLED 1

other setting:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* Copyright (c) 2017 - 2020, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX