Sid_end_device cannot use rtt

Hi All,

1. The SDK used in VS code is version 2.6.1, and running the periphral_uart demo can print in rtt, but not in sid_end_device

The official routine is used for sid_end_device, and no modifications have been made to the code. As we need to use rtt, we will modify the prj.conf

# Log

CONFIG_LOG=y

CONFIG_LOG_PRINTK=y

CONFIG_LOG_BUFFER_SIZE=2048

CONFIG_NVS_LOG_LEVEL_WRN=y

Change to

CONFIG_LOG=y

CONFIG_USE_SEGGER_RTT=y

CONFIG_LOG_BACKEND_RTT=y

CONFIG_LOG_BACKEND_UART=n

CONFIG_LOG_PRINTK=n

However, there was no response during operation

2. Also, I would like to ask if the demo of sid_end_devicedefaults to UART, but I couldn't find the configuration for this UART, so I don't know which IO port UART is printed on for output.

note:Using NRF52840 SOC

Looking forward to seeing you on our platform.

Thanks,

Parents
  • Hi

    1. As sid_end_device has a lot of configuration options depending on the config you select, could you elaborate which config you have selected? 

    2. I would presume it uses uart as default since you already would be using uart for the command line interface. Normally uart0 is the default uart and you can see the default pins here and here

    Regards

    Runar

  • For the default demo, only two changes were made. The first one, prj.conf as mentioned in the question, and the second one, as shown in the above figure, only moved the board target, selecting nrf52840d_nrf52840 and selecting Nordic Soc, without moving anything else

  • Just to be sure. You are not using the DK but trying to flash another board using the nRF52840? If not did you use a jlink with support for RTT?

    I tested the sid_end_device sample with the 52840dk and the following changes to the prj.conf

    # Log
    CONFIG_LOG=y
    #CONFIG_LOG_PRINTK=y
    CONFIG_LOG_BUFFER_SIZE=2048
    CONFIG_NVS_LOG_LEVEL_WRN=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n 

    And it printed the log for RTT just fine. 

    Regards

    Runar

  • I have tried the changes you made above, but it still doesn't work. For jlink, I can print it normally using the peripher_uart ble demo. I don't quite understand the sentence ' You are not using the DK but trying to flash another board using the nRF52840'

Reply Children
  • Sorry, let me try again

    Are you using the DK or a custom board? 

    Regards

    Runar

  • Thank you, and you flash this custom board with a dk or a jlink? Try to flash your application to the custom board, and connect the RTT backend after the application has started, 

    Regards

    Runar

  • Thank you for your analysis. After testing for the past two days, I found that I did not burn “nrfjprog -- sectorerase -- program nordic_aws_nrf52840.hex -- reset”. Then, according to your RTT configuration, rtt can run normally. However, this error occurred: "<err>qspi_nor: JEDEC id [ff ff ff] expect [c2 28 17]".

    So, I went to add it

    &qspi {

    status = "disabled";

    };

    Then compile it and flash “nrfjprog -- sectorerase -- program nordic_aws_nrf52840.hex -- reset”, but the result is that rtt cannot be printed. Then I removed the one I just added, but the result is that rff still cannot be printed. 

    Later on, I felt that RTT was most likely able to print the logs of other demos (because I saw the peripheral_uart), but I still don't know why.

    1.So even though I added the step 'nrfjprog -- sectorerase -- program nordic_aws_nrf52840. hex -- reset', rtt still doesn't work~~.

    2.Except for not trying DK, I have tried everything you said but have had no results.

    3.a custom board, We made this ourselves, which is composed of nrf52840+Semtech SX1262 (only these two chips, no others,no external flash). I don't know the difference between burning with this board and nrf52840dk.

    Looking forward to your reply

  • There is good news, I have found the reason. It is because there is no external flash that RTT cannot print. I removed the configuration related to external flash and was able to log normally. However, there was another error message

    Looking forward to your reply

Related