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

Hardfault Error after calling sd_ble_gap_adv_start

Hello,

im using NRF 51822 with SDK 10 / S110 8.0. Im working on a project that includes one or two timers (initialized by APP_timer function), the ble calender (like discriebed in ble_cts_c), some Gpio and the ble stack S110 module.

I initalized the ble stack and the inits like discriebed in some of the SKD10 examples. (template, ble_cts_c) and start one timer for time scheduling.

When I tested the system without acitiviating advertising start function my time schedule timer runs perfect. BLE stack is initalized at this point.

When I put in the Adversting start function (it dosn't matter if I'm usining the direct way via sd_ble_gab_adv_start() or the way like discribend in the expamples ( err_code = ble_advertising_start(BLE_ADV_MODE_FAST);) the system runs to a hard fault after some seconds. (in my mind it must be at the end of the first round of my time scheduler ~1s).

When I put out the starting of the advetismend the system runs fine again.

Does anyone has a idea whats going wrong?

Kind regards

Jens Woermann

Edit: For some more explanation: I'm using the timer for creating 1ms interrupts to build a internal time sceduler. After 1000 interrupts (1s) the internal counter will be reset to 0 and countings starts again. At the moment it looks like that around this point something happend what I can not see or debug when advertising is started. Normaly i can run one cycle - no more.

We dont using a Nordic devolpment board for our devolpment at the moment. It is a own created hardware with 51822. I only took the code from 3 examples (and one of a colouge of mine) and use it as orientation.

When I comment out sd_ble_gab_adv_start() in ble_advertising.c the system runs again. The idea of my colouge and me is that something is going wrong during the initalisation. But I'm not sure where I should look. Init Code is nearly hte same like in ble_cts_c exampe (I taken out the key boundery, because this works diffend at our board).

Parents
  • Hello,

    I only use two interrupt by my side. Its for one timer to realise the time scheduler (1ms) and the security timer (like discriebed in ble_cts_c exapmple for the sequrity request timeout). The only perepheries I using are these 2 timers and some digital IO's. (excluded the ble stack events and error handlers)

    There is no further code except the timer init and the time scheduler, the IO initialistion and the ble stack. (mostly taken from ble_cts_c)

    I do not getting any error code when calling the function. At this point the system chrash down / run to hard fault handler and give not back any error code. (because it dons't reach the return potin). I check the error codes during all other ble stack initalisations (ble stack init, gab init, etc.) - that looks fine. (returns always NRF_SUCCSES or 0x00000000)

    I'm going to check today the interrupt priorties. There is no point in my mind where i disable the IRQ functionalties knowingly. I'm going to check this, too.

    Regards

    Jens

Reply
  • Hello,

    I only use two interrupt by my side. Its for one timer to realise the time scheduler (1ms) and the security timer (like discriebed in ble_cts_c exapmple for the sequrity request timeout). The only perepheries I using are these 2 timers and some digital IO's. (excluded the ble stack events and error handlers)

    There is no further code except the timer init and the time scheduler, the IO initialistion and the ble stack. (mostly taken from ble_cts_c)

    I do not getting any error code when calling the function. At this point the system chrash down / run to hard fault handler and give not back any error code. (because it dons't reach the return potin). I check the error codes during all other ble stack initalisations (ble stack init, gab init, etc.) - that looks fine. (returns always NRF_SUCCSES or 0x00000000)

    I'm going to check today the interrupt priorties. There is no point in my mind where i disable the IRQ functionalties knowingly. I'm going to check this, too.

    Regards

    Jens

Children
No Data
Related