Please note that "CY_BLE_EVT_GAP_DEVICE_CONNECTED" event is generated only when "Link Layer privacy" is disabled. This can be done by unchecking the "Enable Link layer privacy" option in component's "Link layer Settings" tab.
Having said that, when LL privacy is enabled, instead of this event "CY_BLE_EVT_GAP_ENHANCE_CONN_COMPLETE" event is generated. The reason is both have a slightly different parameters that is passed to the handler. You can use the below code to automatically use either of the event depending on if LL privacy is enabled or not in your application.
= (cy_stc_ble_gap_enhance_conn_complete_param_t *)eventParam;
= (cy_stc_ble_gap_connected_param_t *)eventParam;
Let me know if this helps.
Meenakshi Sundaram R