diff --git a/Include/arm_math.h b/Include/arm_math.h
index 544854cf..afa8619a 100644
--- a/Include/arm_math.h
+++ b/Include/arm_math.h
@@ -161,7 +161,9 @@
* - DISABLEFLOAT16:
*
* Disable float16 algorithms when __fp16 is not supported for a
- * specific compiler / core configuration
+ * specific compiler / core configuration.
+ * This is only valid for scalar. When vector architecture is
+ * supporting f16 then it can't be disabled.
*
*
* \section pack CMSIS-DSP in ARM::CMSIS Pack
diff --git a/Include/arm_math_types_f16.h b/Include/arm_math_types_f16.h
index 14ac3fb6..e731f90b 100755
--- a/Include/arm_math_types_f16.h
+++ b/Include/arm_math_types_f16.h
@@ -49,15 +49,15 @@ won't be built.
*/
#if !(__ARM_FEATURE_MVE & 2)
- #if defined(__ARM_FP16_FORMAT_IEEE) || defined(__ARM_FP16_FORMAT_ALTERNATIVE)
- typedef __fp16 float16_t;
- #define ARM_FLOAT16_SUPPORTED
- #endif
-#else
- /* HW Float16 not yet well supported on some configs */
#if !defined(DISABLEFLOAT16)
- #define ARM_FLOAT16_SUPPORTED
+ #if defined(__ARM_FP16_FORMAT_IEEE) || defined(__ARM_FP16_FORMAT_ALTERNATIVE)
+ typedef __fp16 float16_t;
+ #define ARM_FLOAT16_SUPPORTED
+ #endif
#endif
+#else
+ /* When Vector float16, this flag is always defined and can't be disabled */
+ #define ARM_FLOAT16_SUPPORTED
#endif
#if defined(ARM_MATH_NEON) || (defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE)) /* floating point vector*/
diff --git a/Source/TransformFunctions/arm_cfft_radix2_init_f16.c b/Source/TransformFunctions/arm_cfft_radix2_init_f16.c
index 83154900..e8d7edf3 100755
--- a/Source/TransformFunctions/arm_cfft_radix2_init_f16.c
+++ b/Source/TransformFunctions/arm_cfft_radix2_init_f16.c
@@ -63,6 +63,8 @@
This Function also initializes Twiddle factor table pointer and Bit reversal table pointer.
*/
+#if defined(ARM_FLOAT16_SUPPORTED)
+
arm_status arm_cfft_radix2_init_f16(
arm_cfft_radix2_instance_f16 * S,
uint16_t fftLen,
@@ -203,6 +205,7 @@ arm_status arm_cfft_radix2_init_f16(
return (status);
}
+#endif /* #if defined(ARM_FLOAT16_SUPPORTED) */
/**
@} end of ComplexFFT group
*/
diff --git a/Source/TransformFunctions/arm_cfft_radix4_init_f16.c b/Source/TransformFunctions/arm_cfft_radix4_init_f16.c
index c7aa0fce..1cbf8f73 100755
--- a/Source/TransformFunctions/arm_cfft_radix4_init_f16.c
+++ b/Source/TransformFunctions/arm_cfft_radix4_init_f16.c
@@ -66,6 +66,8 @@
This Function also initializes Twiddle factor table pointer and Bit reversal table pointer.
*/
+#if defined(ARM_FLOAT16_SUPPORTED)
+
arm_status arm_cfft_radix4_init_f16(
arm_cfft_radix4_instance_f16 * S,
uint16_t fftLen,
@@ -163,7 +165,7 @@ arm_status arm_cfft_radix4_init_f16(
#endif
return (status);
}
-
+#endif /* #if defined(ARM_FLOAT16_SUPPORTED) */
/**
@} end of ComplexFFT group
*/