BLE advertising rate interval - how to auto change from min to max?

II have a question on how to automatically activate the change from “minimum BLE advertising interval” to “maximum BLE advertising interval” after (for instance) 30 seconds.

I am using the nrf5340-DK board (as well as a custom battery-only nrf5340 based board) and the nrf Connect SDK v1.9.1 with VS Code.
Initially I setup the BLE SoftDevice PERIPHERAL in my main.c this way:
#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
#define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1)

static K_SEM_DEFINE(ble_init_ok, 0, 1);
static struct bt_conn *current_conn;
static struct bt_conn *auth_conn;
static struct bt_data ad = {
    BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
    BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN),
};
static const struct bt_data sd = {
    BT_DATA_BYTES(BT_DATA_UUID128_ALL, BT_UUID_NUS_VAL),
    // BT_DATA_BYTES(BT_DATA_UUID128_ALL,
    // 0x84, 0xaa, 0x60, 0x74, 0x52, 0x8a, 0x8b, 0x86,
    // 0xd3, 0x4c, 0xb7, 0x1d, 0x1d, 0xdc, 0x53, 0x8d),
};

smp_bt_register();
bt_conn_cb_register(&conn_callbacks);
err = bt_nus_init(&nus_cb);
err = bt_enable(NULL);
k_sleep(K_MSEC(10));
k_sem_give(&ble_init_ok);
err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd));
With the above setup/code, BLE seems to work well & I can happily connect & disconnect from the 5340 based peripheral running the above code.
However the default advertising rate is very fast at around 104ms (so uses a lot of power). So I wanted to change the advertising rate and therefore added the following #define to the above main.c  code:

#define BT_LE_ADV_CONN_CUSTOM  BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, 0x0b40, 0x0b40, NULL)
And I changed the “bt_le_adv_start(..)” function line to use this newly defined advertising interval, to:
err = bt_le_adv_start(BT_LE_ADV_CONN_CUSTOM, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd));
This worked like a charm and changed my advertising interval (as measured by nrf Connect for iOS) from around 104ms to around 1800ms (roughly equal to the “0x0b40” interval parameter I defined).
However, what I REALLY want to do is to initially start the advertising interval (after a system reset OR after a BLE disconnect) at a much faster rate (eg: 104ms = 0x00a0 - which was the original default) and then AUTOMATICALLY change it to the slower advertising rate (1800ms = 0x0b40) after 30 seconds.
So I then changed my advertising interval #define line to:
#define BT_LE_ADV_CONN_CUSTOM  BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, 0x00a0, 0x0b40, NULL)
BUT this doesn’t seem to work as the advertising rate ALWAYS remains at the minimum rate (104ms =  0x00a0) . It NEVER seems to “switch-over” to the maximum rate as defined in the changed #define line above.
I assume this is because I need to set some “switch over from min to max advertising rate timer” somewhere but I can’t seem to find that option or I can’t figure out how to do it!
Can you please help me solve this problem (ie: how to set it up so that the BLE advertising rate automatically switched from minimum to maximum after 30 seconds - or any other time I may wish to define)?
Thanks!
Gerard 
Related