mdbt42v-512kv2

As you can see in the schematic, I have a custom board, and I’m uploading code to it via J-Link. I can control the pins, turn on an LED, and read a button without any problems. However, when I try to activate BLE, the program doesn’t work properly — the device doesn’t show up on my phone, and the other functionalities also stop working. By the way, I currently don’t have a 32.768 kHz crystal connected to the PCB. Can someone help me identify where the issue might be coming from?

Parents
  • The BTLE examples require the 32.768kHz crystal by default. You need to change the configuration in order to use the LFRC. Very often discussed here, should also be mentioned in the docs.

  • I'm trying to control it via Arduino. To make it use the internal oscillator, I added the following line to the boards.txt file:
    feather52832.build.extra_flags=-DARDUINO_FEATHER52 -DNRF_SDH_CLOCK_LF_SRC=1
    However, it didn't respond. Here's the code I used:

    #include <bluefruit.h>
    
    #define LED_PIN 4  // P0.04
    
    void setup() {
      pinMode(LED_PIN, OUTPUT);
    
      Bluefruit.begin();
      Bluefruit.setTxPower(4);    // (Optional) Set transmission power
      Bluefruit.setName("MDBT42Q"); // Bluetooth cihaz ismi
      Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
      Bluefruit.Advertising.addTxPower();
      Bluefruit.Advertising.addName();
      Bluefruit.Advertising.start(0);  // 0 = advertise forever
    
      delay(1000);  // Stabil başlatma için kısa bekleme
    }
    
    void loop() {
      digitalWrite(LED_PIN, HIGH);
      delay(2000);  // 2 saniye açık
      digitalWrite(LED_PIN, LOW);
      delay(2000);  // 2 saniye kapalı
    }

Reply
  • I'm trying to control it via Arduino. To make it use the internal oscillator, I added the following line to the boards.txt file:
    feather52832.build.extra_flags=-DARDUINO_FEATHER52 -DNRF_SDH_CLOCK_LF_SRC=1
    However, it didn't respond. Here's the code I used:

    #include <bluefruit.h>
    
    #define LED_PIN 4  // P0.04
    
    void setup() {
      pinMode(LED_PIN, OUTPUT);
    
      Bluefruit.begin();
      Bluefruit.setTxPower(4);    // (Optional) Set transmission power
      Bluefruit.setName("MDBT42Q"); // Bluetooth cihaz ismi
      Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
      Bluefruit.Advertising.addTxPower();
      Bluefruit.Advertising.addName();
      Bluefruit.Advertising.start(0);  // 0 = advertise forever
    
      delay(1000);  // Stabil başlatma için kısa bekleme
    }
    
    void loop() {
      digitalWrite(LED_PIN, HIGH);
      delay(2000);  // 2 saniye açık
      digitalWrite(LED_PIN, LOW);
      delay(2000);  // 2 saniye kapalı
    }

Children
No Data
Related