You should use blecen_Conn() instead of using blecm_CreateConnection() directly.
In blecen_Conn(), you can set high_scan_duration and low_scan_duration within the structure blecen_cen_cfg when you attempt to create a ble connection.
When high_scan_duration is expired, stack will switch to use low_scan_window/low_scan_interval with low_scan_duration to continue scan.
When low_scan_duration again gets expired, the connection attempt would stop.
Or you can overwrite the behavior above by registering blecen_usertimerCb() in app_create(). In the sample application hello_client in SDK 2.1.1, hello_client_timer_callback(), it keeps low_scan forever after scan timed out and cancels original connection attempt.
Only when connect is up a call back is invoked.
It looks that only blecm_CreateConnectionCancel can stop the initiator process.
When you call “blecen_Conn(NO_CONN, NULL, 0);”, it will call to blecm_CreateConnectionCancel().
So you don’t have to call blecm_CreateConnectionCancel() separately in your application.