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,

  • 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

  • I added it through

    &qspi {

    status = "disabled";

    };

    and

    CONFIG_MAIN_STACK_SIZE=2048

    Solved the above errors

    But new problems have arisen,

    This is done through debugging in sid_init (&sm ->sid ->config,&sm ->sid ->handle); After calling, it died without any modifications to the code section, using the default code of the demo

    Looking forward to your reply

Related