![]() ![]() Click 'Target->Download " name of project"'. This will program both the SoftDevice and the application code to your nRF52840 DK. You should now see that LED1 on the nRF52840 DK is blinking periodically. This indicates that the application is running, and that the device is advertising. Your device should show up in the device list: Open up nRF Connect for Mobile and start scanning. You can do this by modifying the DEVICE_NAME define in main.c: You might want to make the advertising name more unique to help recognize your device. TODO PART 1: Test out NRF_LOG module NRF_LOG_ERROR( "This is an ERROR message. ![]() Now you should see this output on your terminal: NRF_LOG_WARNING( "This is a WARNING message. Note how there seems to be a missing message! Why is there no message saying "This is a DEBUG message."? It is missing because the default severity level is set to "info" in sdk_config.h. With this severity level only warnings, errors, and info messages are printed. When you recompile the project you should see this in your serial terminal: We can change this by finding NRF_LOG_DEFAULT_LEVEL in sdk_config.h and set it to 4 (Debug). Segger embedded studio download error serial# One more thing that is extensively used in the SDK, and something that goes hand in hand with the Logger Module, is the Error Module. Throughout the entire SDK you will see functions returning error codes and that these error codes can be checked with the macro called APP_ERROR_CHECK(error code). What happens now? You should get another error: Uint32_t err_code = nrf_sdh_enable_request() So try to add this code after the logging messages: APP_ERROR_CHECK(1234). Here you can see that we get error 8 in return when we call the function nrf_sdh_enable_request(). When you get errors like this, the first thing you should do is to go to and look up the documentation for the function that returned the error. The documentation for nrf_sdh_enable_request() tells us that we get error 8, NRF_ERROR_INVALID_STATE, because the SoftDevice is already enabled.ĭisable UART as backend by setting NRF_LOG_BACKEND_UART_ENABLED to 0 and instead turn on the RTT backend by setting NRF_LOG_BACKEND_RTT_ENABLED to 1. Start a debugging session and use SES's integrated Debug Terminal to see the debug information. The RTT can be very useful in cases where you need the UART for other things than debugging, or in advanced applications where you can't afford to use the CPU to print messages using UART.Ĭontinue to Part 2: Setting up the PWM driver.Segger Embedded Studio (SES) is an Integrated Development Environment (IDE) for Nordic Semiconductor products, such as nRF52832 which is at the heart of RuuviTag. IDE brings together almost all the steps required for developing C-code for RuuviTags, such as writing the code, compiling the code, flashing the code to RuuviTag and debugging the code as it is being run on RuuviTag. Segger embedded studio download error code#.Segger embedded studio download error serial#. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |