Issues with NCS LOGS with Particle Xenon

Hi there,

I have just started the NCS Fundamental Course and I am stuck on Exercise 4 Lesson 1 and Lesson 2. There are two problems that I am facing.

1) If I use the nrf52832DK board for build configuration. I get the logs but my button press won't be recognized.

2) If I change the board, to Particle Xenon and connect using the debug-out port. I am able to get the button press that I check using a debugger. but I am unable to see any log no matter if I use printk or LOG_INF commands. I even downloaded the solution and then flash it but it shows the same behavior.

  • I am stuck on Exercise 4 Lesson 1 and Lesson 2.

    Do you mean Lesson 4, exercise 1 and 2?

    1) If I use the nrf52832DK board for build configuration. I get the logs but my button press won't be recognized.

    Let's focus on issue 1 first. Try to execute these steps:

    • Click on the V2.x.x button (to make it work with NCS v2.1.0)

    • Go all the way to the bottom and download the complete solution

    Here it is: 0882.fund_less4_exer1_solution.zip

    • Open the sample in VS Code and add a build folder for nRF52 DK nrf52832
    • Make sure you're using NCS v2.1.0

    • Flash the sample

    • Open COM port

    • Reset the nRF52 DK (nrf52832) and press button 1

    • Then you should see the following log

    When you have gotten this to work, we can look into your 2nd issue.

    Best regards,

    Simon

  • Hi Simon,

    So I followed the same steps for the NRF52DK board. I have attached the output. You can see the initial Logs, but there is nothing on the press of a button. I also run it in the debug and put a breakpoint in the callback and it never hit.

    Also, the LED is not ON as well.

    In contrast when I run the same code on Xenon. The LED does ON and the breakpoint in the callback is also hit when we press the button. but in that case, No LOG is printed on the screen.

    The attached pictures are for the NRF52DK board.

  • HI Simon,

    I note one thing.

    I burn the ble_app_blinky program from NRF SDK just to confirm if my buttons and LEDs are fine. The LED was fine and blinking. but the button was not working. I put the breakpoint in the callback and it never hit. Then I measure the voltage at P.13 using a multimeter. It was 2.4v because of pull-up and when I press the button it goes to zero. so the button is detected voltage-wise but not in the code.

  • Can you try with another button, for example button 2,3 or 4?

    Can you test with for example P0.30 by using the code below? Use pullup and simulate a button press by connecting P0.30 to ground.

    //Use P0.30 instead
    gpio_init_callback(&button_cb_data, button_pressed, BIT(30));	

    Can you test the button sample <ncs>/zephyr/samples/basic/button?

    Best regards,

    Simon

Related