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

Parents
  • 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

Reply
  • 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

Children
No Data
Related