nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using MDBT42Q and BLE

Hello:

I'm relatively new and have been using 52832 DK for several months without any problems.  It is a great product.  As I gained experience, I've tried programming other boards (GT52832_A01) using a mini J-Link that I bought from Adafruit - again without problems. All of the example programs load and run on both DK and GT boards as expected.

I recently bought a few MDBT42Q modules from Mouser (they are made by Seeed Studios).  I believe this is the same module used by Adafruit on their Featherboard 52832, so I thought this would be a good product to expand my experience.  I was able to program the MDBT42Q boards using the J-Link, however, when I try to use anything with BLE the program loads but I'm not able to connect to the board via BLE.  I load the soft device loads and then the program the same way as with the DK and GT boards, except I'm not able to connect to the MDBT42Q board.  It is as if the board isn't advertising.

I did a search in the DevZone and found one post by Sudarshan J 10 months ago that looked similar to my problem but I'm not sure how to proceed and hope you might suggest some things to try.  

The datasheet for the MDBT42Q basically says that you don't need any external circuitry to make the module work, so it may not be a clock problem - but I'm not sure.  Since the module works fine (I can load simple blinky programs and program gpio, etc), I think I'm missing something simple.  

Any suggestions?

A related question - I tried to use debug to set breakpoints before and after the advertising function to try to see what was happening.  I tried to go stepwise through the program but execution just stops - so I must be missing something there as well.  There is a warning that there is a 32Kb limit on evaluation in debug - is that the problem?  Any suggestions?

Thank you for your help.

Parents Reply Children
  • Please keep a civil tone. 's questions and suggestions make full sense.

    And to sum up: The only relevant difference between the 52832 DK and the MDBT42Q module is that the DK has a 32 kHz crystal and the module does not. So as long as you remember to configure the SoftDevice to use the internal 32 kHz RC instead of the non-existing 32 kHz crystal oscillator everything should work as on the DK.

  • here is what I've learned.

    From the pack installer load the "experimental_ble_app_blinky_s132_pca10040" example.

    connect the MDBT42Q and erase the chip with nRFgo Studio.

    Load the Softdevice.

    In the program comment out //SOFTDEVICE_HANDLER(NRF_CLOCK_LFCLKSCR_XTAL_20_PPM, false);

    replace with :

    SOFTDEVICE_HANDLER(NRF_CLOCK_LFCLKSCR_RC_250_PPM_250MS_CALIBRATION, false);

    load the program.  You should be able to connect by running the nRF Blinky app on your phone.  The LED on/of will toggle pin 17 and if you ground pin 13 you should see the button pressed/released toggle on the phone.

    There is still a problem with UART programs - they don't use SOFTDEVICE_HANDLER.  What is the difference between using SOFTDEVICE_HANDLER and the way connection is managed with UART program?

  • He is rude and looking at his post history he has that tone with everyone. I'll just switch to another platform if that is how this community is run.

  • I got mine going on the MDBT42Q, i think it was an issue with the default pca10040 board header. After switching to a custom board definition it's working. 

    I'd love to try loading the same example you are to help but I cannot find that example. I'm using nRF5_SDK_15.2.0_9412b96.zip and building with armgcc for my application. Let me know.

  • That's great.  I'm using nRF5_SDK_15.0.0_a53641a.  But the example is from the pack installer.

    Go to pack installer and under Nordic select nRF52832 on left side.  On right side click on Examples tab.

    Go down to "Experimental_ble_app_blinky_s132_pca10040" and copy to a folder.  Keil will open with the example loaded and you should be able to make the clock change (SOFTDEVICE_HANDLER) without problem.  You will need to load the nRF_blinky app on your phone to test.

    Tell me how to change to a custom board so I can try that.  What board should I put into the header?

    The thing I find interesting is that the example using the SOFTDEVICE_HANDLER works when you change the clock, but the UART example doesn't after making the same changes to the config file.  I'm sure it must be something simple but haven't figured it out yet.

    Thank you for continuing to work on this - much appreciated.

Related