MDBT42Q NUS Example Does Not Run Correctly Using nrf Connect 2.3.0 and VS Studio Code

I have used the Raytac MDBT42Q running NUS in past Soft Device-based projects with no problems.  Now using the new nrf Connect 2.3.0 SDK and VS Studio Code and trying to get the NUS example to run properly.  Using nrf53832 DK hardware definitions as the "board".  No custom board definitions.  Using the factory nrf52832 board definitions. Raytac device has external  32KHz crystal and is connected to nothing but 4 DK LEDs wired like the nrf52832 DK Leds. DK Button pins on the MDBT42Q are pulled high via 100k resistors. MDBT42Q LEDs and Buttons are wired just like the nrf52832 DK hardware.  I finally got the MDBT42Q to advertise and connect via BLE but data from the iPad running nrf Tool Box does not transfer.  The same code runs fine on a PCA10040 board. In addition, code only runs under Debug on the Raytac module. I've been at this for days and have attempted to use the Forum to solve the problem. Raytac UART0 prints Zephyr banner message and "Starting Nordic UART service example" to external terminal and JLink programming/debugging stuff is working correctly. Also tried this whole thing under Ubuntu and the MDBT42Q does not advertise. Out of frustration, moved to Windows where the Raytac does at least advertise and connect. Any pointers in the right direction will be greatly appreciated. Thanks in advance.

  • Hi Fred, 
    It does sound a little bit strange. Could you try something without UART ? Maybe try the periphreral_lbs ? 
    And you are saying if you run in debug mode everything works fine ? You can send and receive UART data to and from the phone ? 

    Could you try to debug using log instead ? You can either use RTT log or UART via printk. 

    If you new to nRF Connect SDK I would suggest to take a look at the Nordic Academy: https://academy.nordicsemi.com/

    We have courses for getting started with nRF Connect SDK and also course for Bluetooth Low Energy. 

  • Thanks, Hung.. I've already attended the Academy :-)  I've also read matt.heins NUS post.

    Only in debug mode can I get the Run and Connect DK LEDs to activate.  Only in debug mode can I connect and disconnect using nrf Toolbox.

    The program will not start if I simply Flash the device. I've tried powering down and back up after a Flash and the program still will not start.  I saw a post that suggested I disable the LFXO from within the prj.conf.  I did that with no joy. I cannot send and receive UART data to and from my iPad. 

    Funny thing is that everything works just fine on the factory nrf52832 dev kit.

    I'll give your suggestions a shot.  Thanks for your help with this.

  • Went back to basics.. Tried to run the blinky example.  It runs under Debug but will not start when I simply Flash the MDBT42Q.

  • Hi, Hung

    OK... Got NUS and peripheral_lbs to work in debug mode on the MDBT42Q.  Neither app starts when I Flash the part.

  • Hi Fred, 
    You mentioned that you saw "Starting Nordic UART service example" printed out on UART when you tested with the Raytac module. Was that when it ran or when in debugging? 

    Could you send the schematic of the board ? Do you do anything with the reset pin ? I assume you have a MDBT42Q 512KV2 ? Then it's pin P0.21

    Another thing I think worth to try is to try flashing a simple application (blinky) in NRF5 SDK. This is to rule out any problem with nRFConnect/ Zephyr set-up you have.  

Related