xTaskCreate();

So the BLE task is also notified by a task ?
If you just want to periodically measure some sensors you can do it with a simple loop and a delay as you did it (without the ulTaskNotifyTake) or if a task triggers the measurement with a notification then again the delay should not be needed.
At least for testing I’d omit the ulTaskNotifyTake in the BLE task and let the measurement loop run with a delay and verify that the dk_task controls the pin as desired. Mean’s check that the conditions / the limit checks are correct.
Later on for instance In the send_notification functions I’d add a test if the currently measured value has changed and only in this case notify the dk_task as already proposed.
And I’d simplify the code in dk_task by checking all conditions and set the GPIO once analog to this pseudo code:

bool value = (sensor1 > limit1) || (sensor2 < limit2) …;
cyhal_gpio_write(…, value);

This should work. It doesn’t seem too complicated.
With a debugger attached you can simply set some breakpoints e.g. in the dk_task at the condition check and step through the code. You’ll quickly see what’s wrong.