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
  • I see. Did you remember to flash the SoftDevice as well as the application? If so yes and it still does not work, have you done some debugging to see what is happening on the target?

  • I'm having the same issue. Code runs and works well on the PCA10040 but I'd like to flash it to a MDBT42Q. I also tried switching to RC clock but it'd not working out. 

    Please post if you find a fix. Thanks!

  • I'm having the same issue.

    How do you know it's the same issue?

    What debugging have you done to find where the problem is ?

    Have you programmed the SoftDevice?

    Have you tested with an unmodified Nordic example?

  • I haven't tested this extensively but I'm now able to communicate with the MDBT42Q via BLE.  It involved 2 steps.

    1.   you need to change the clock source in the ble_stack_init function (or wherever the soft device handler is located) as follows:

    change:  

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false);

    to:

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_500MS_CALIBRATION, false);

    2.

    Use the debugger on SDK board instead of the mini JLink I have been using.  I don't understand why this worked - but it did. 

    I made an 8 pin connector for the 8 pins next to the PCA10040.  VDD and VTG are connected to SDK VDD 3.3 V supply.  SWDIO connect to MDBT Module SWDIO (pin 37).  SWDCLK to MDBT Module SWDCLK (Pin 36) and Reset to MDBT Module reset (Pin 35).  SWO not connected. GND detect connected to common ground on both SDK board and Module.  In my setup the module is connected to separate 3.3v supply with common ground.  VDD nRF is not connected.

    Since making those changes I've been able to load programs on the SDK board and test them and then connect the MDBT module (via the 8 pin connector) and load the same softdevice and program.  The Module then runs the program the same as the SDK board.

    I've tested the BLE_blinky program and that works on MDBT the same as the SDK board  using nRF Blinky app on android phone.  

  • Use the debugger on SDK board instead of the mini JLink I have been using.  I don't understand why this worked - but it did.

    You'd need to take that up with Adafruit.

Related