This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

configuration BLE and softdevice

Hello,

I'm working with a proprietary chip that has a nRF51822. I want to configure it as a BLE peripheral. I'm using ble_ app_uart example to achieve this.

I tried it on the dongle nRF51 and it works fine. Now I'm transferring it to the chip. I had some problems with the SOFTDEVICE_HANDLER_INIT function because of the clock configuration, as you can see on this post.

I configured to use the NRF_CLOCK_LF_SRC_RCand now it doesn't give me an error when trying to enable the sofdevice. When it goes to the ble_advertising_start(BLE_ADV_MODE_FAST); function it doesn't give me an error but it doesn't connect to the central (configured on a DK51 and previously tested).

My chip has a crystal connected to the pins XC1 and XC2, but none connected to the XL1 and XL2 pins, that why I use the internal oscillator. I'm not getting any errors when I configure the pins/clocks nor when I enable the functions I need, but it still doesn't connect to the central.

Other thing is that I'm using the DK51 to program and debug the chip because I don't have access to a J-link probe, does this introduce some problems? Because when I debug it seems to respond strangely some times.

So I wanted to ask for some help, regarding this problem, it goes to the advertising (appears to have the right settings) but it doesn't connect to the central device!

I reviewed some questions to avoid duplication; apologies if this was already asked and/or answered. Here are some snippets of my code, at least what I think it is important for this problem, If needed more just ask!

Thanks, Jorge. (I use nrf51, SDK11 and SD130 v2)

Parents
  • It seemed that yesterday was fluke... Yesterday I tried with the Synth clock and it appeared on my MCP on the iphone, but today is not working again (without changing anything). I tried to debug it on the Keil and when is getting out of the function ble_advertising_start and tries to printf the status it gives me an error of "***JLink Error: Programming failed @ address 0x00010508 (block verification error)" and it stays on this loop

        // If printing is disrupted, remove the irq calls, or set the loop variable to 0 in the debugger.
    
    __disable_irq();
    
    while(loop);
    
    __enable_irq();
    

    I tried to put the variable loop to 0 and continue, but after a while it goes back to the same place.

Reply
  • It seemed that yesterday was fluke... Yesterday I tried with the Synth clock and it appeared on my MCP on the iphone, but today is not working again (without changing anything). I tried to debug it on the Keil and when is getting out of the function ble_advertising_start and tries to printf the status it gives me an error of "***JLink Error: Programming failed @ address 0x00010508 (block verification error)" and it stays on this loop

        // If printing is disrupted, remove the irq calls, or set the loop variable to 0 in the debugger.
    
    __disable_irq();
    
    while(loop);
    
    __enable_irq();
    

    I tried to put the variable loop to 0 and continue, but after a while it goes back to the same place.

Children
No Data
Related