This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I see the NFR_LOG_INFO

Hello to everyone in this community,

I am new with NordicSemi chips and I have the Development kit 52832. I opened the example folder from the SDK 13, SPI slave and i saw some code using NRF_LOG_INFO in order to print something in one terminal, I think so, but when I flash the memory with the code with help of Eclipse and using the J-link flash tool. flash: $(OUTPUT_DIRECTORY)/nrf52832_xxaa.hex @echo Flashing: $(NRFJPROG_CMD) --program $(OUTPUT_DIRECTORY)/nrf52832_xxaa.hex -f nrf52 --sectorerase $(NRFJPROG_CMD) --reset -f nrf52

I open Tera Term with the following setup Baute rate: 115200 data: 8 bit Pariry: none Stop: 1 bit Flow control: none

Anything is printed out in the terminal screen. Then i read in order tread, that I need to change the code in the sdk_config.h.

devzone.nordicsemi.com/.../

#ifndef NRF_LOG_BACKEND_SERIAL_USES_UART #define NRF_LOG_BACKEND_SERIAL_USES_UART 1 #endif

After flashing again, Im still having the same problem.

Then I change to the J-link RTT viewer, obviolsy i change the UART to 0 again, then I open the J-link programm with RRT and nothing.

#ifndef NRF_LOG_BACKEND_SERIAL_USES_RTT #define NRF_LOG_BACKEND_SERIAL_USES_RTT 1 #endif

Someone can explain me how can I print out some string then?

Regards,

David Caraveo

  • Hi,

    Do you have #define NRF_LOG_ENABLED 1 in sdk_config.h ?

  • Hello Sigurd,

    I did also that, i activate the NRF_LOG_ENABLED to 1. When I open the J-Link Viewer , I have three taps, Log, All Terminals and Terminal 0. Only in my Log I've the following. J-Link RTT Viewer V6.12a: Logging started. LOG: Global terminal added. LOG: Terminal 0 added. LOG: Device "NRF52832_XXAA" selected. LOG: Found SWD-DP with ID 0x2BA01477 LOG: Found SWD-DP with ID 0x2BA01477 LOG: AP-IDR: 0x24770011, Type: AHB-AP LOG: Found Cortex-M4 r0p1, Little endian. LOG: FPUnit: 6 code (BP) slots and 2 literal slots LOG: CoreSight components: LOG: ROMTbl 0 @ E00FF000 LOG: ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS LOG: ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT LOG: ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB LOG: ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM LOG: ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU LOG: ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM LOG: RTT Viewer connected.

  • By default the LOG is printed deffered, so you wont see any output before you call "NRF_LOG_FLUSH();". Have you connect the board to a SPI master? if not you will be stuck in the loop "while (!spis_xfer_done)". Add a "NRF_LOG_FLUSH();" after NRF_LOG_INFO("SPIS example\r\n"); and it will be printed. Or you can disable deferred log, #define NRF_LOG_DEFERRED 0

  • Hello Sigurd,

    Finally I found the error, my parther and I add different sdk_config from differnt examples and some definitions were repited. Also SPI slave was unenable. Anyways, thanks for your help.

    Regards, David Caraveo

Related