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 Reply Children
  • 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ı
    }

Related