[CMSIS] Add support of CRC stripping for Type frames (CSTF) feature

Change-Id: I6d6a0b97233bc28109db6249bed6c6dbbc1518d1
diff --git a/Include/stm32f745xx.h b/Include/stm32f745xx.h
index 71d94e7..5c7e816 100644
--- a/Include/stm32f745xx.h
+++ b/Include/stm32f745xx.h
@@ -14632,6 +14632,9 @@
 /*                                                                            */
 /******************************************************************************/
 /* Bit definition for Ethernet MAC Control Register register */
+#define ETH_MACCR_CSTF_Pos                            (25U)
+#define ETH_MACCR_CSTF_Msk                            (0x1UL << ETH_MACCR_CSTF_Pos) /*!< 0x02000000 */
+#define ETH_MACCR_CSTF                                ETH_MACCR_CSTF_Msk       /* CRC stripping for Type frames */
 #define ETH_MACCR_WD_Pos                              (23U)
 #define ETH_MACCR_WD_Msk                              (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
 #define ETH_MACCR_WD                                  ETH_MACCR_WD_Msk         /* Watchdog disable */
diff --git a/Include/stm32f746xx.h b/Include/stm32f746xx.h
index ae1298c..2901862 100644
--- a/Include/stm32f746xx.h
+++ b/Include/stm32f746xx.h
@@ -14980,6 +14980,9 @@
 /*                                                                            */
 /******************************************************************************/
 /* Bit definition for Ethernet MAC Control Register register */
+#define ETH_MACCR_CSTF_Pos                            (25U)
+#define ETH_MACCR_CSTF_Msk                            (0x1UL << ETH_MACCR_CSTF_Pos) /*!< 0x02000000 */
+#define ETH_MACCR_CSTF                                ETH_MACCR_CSTF_Msk       /* CRC stripping for Type frames */
 #define ETH_MACCR_WD_Pos                              (23U)
 #define ETH_MACCR_WD_Msk                              (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
 #define ETH_MACCR_WD                                  ETH_MACCR_WD_Msk         /* Watchdog disable */
diff --git a/Include/stm32f750xx.h b/Include/stm32f750xx.h
index 407c6db..ec4d892 100644
--- a/Include/stm32f750xx.h
+++ b/Include/stm32f750xx.h
@@ -15273,6 +15273,9 @@
 /*                                                                            */
 /******************************************************************************/
 /* Bit definition for Ethernet MAC Control Register register */
+#define ETH_MACCR_CSTF_Pos                            (25U)
+#define ETH_MACCR_CSTF_Msk                            (0x1UL << ETH_MACCR_CSTF_Pos) /*!< 0x02000000 */
+#define ETH_MACCR_CSTF                                ETH_MACCR_CSTF_Msk       /* CRC stripping for Type frames */
 #define ETH_MACCR_WD_Pos                              (23U)
 #define ETH_MACCR_WD_Msk                              (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
 #define ETH_MACCR_WD                                  ETH_MACCR_WD_Msk         /* Watchdog disable */
diff --git a/Include/stm32f756xx.h b/Include/stm32f756xx.h
index 2ae1238..89cb849 100644
--- a/Include/stm32f756xx.h
+++ b/Include/stm32f756xx.h
@@ -15273,6 +15273,9 @@
 /*                                                                            */
 /******************************************************************************/
 /* Bit definition for Ethernet MAC Control Register register */
+#define ETH_MACCR_CSTF_Pos                            (25U)
+#define ETH_MACCR_CSTF_Msk                            (0x1UL << ETH_MACCR_CSTF_Pos) /*!< 0x02000000 */
+#define ETH_MACCR_CSTF                                ETH_MACCR_CSTF_Msk       /* CRC stripping for Type frames */
 #define ETH_MACCR_WD_Pos                              (23U)
 #define ETH_MACCR_WD_Msk                              (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
 #define ETH_MACCR_WD                                  ETH_MACCR_WD_Msk         /* Watchdog disable */
diff --git a/Include/stm32f765xx.h b/Include/stm32f765xx.h
index 58e562c..6f37b8f 100644
--- a/Include/stm32f765xx.h
+++ b/Include/stm32f765xx.h
@@ -15266,6 +15266,9 @@
 /*                                                                            */
 /******************************************************************************/
 /* Bit definition for Ethernet MAC Control Register register */
+#define ETH_MACCR_CSTF_Pos                            (25U)
+#define ETH_MACCR_CSTF_Msk                            (0x1UL << ETH_MACCR_CSTF_Pos) /*!< 0x02000000 */
+#define ETH_MACCR_CSTF                                ETH_MACCR_CSTF_Msk       /* CRC stripping for Type frames */
 #define ETH_MACCR_WD_Pos                              (23U)
 #define ETH_MACCR_WD_Msk                              (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
 #define ETH_MACCR_WD                                  ETH_MACCR_WD_Msk         /* Watchdog disable */
diff --git a/Include/stm32f767xx.h b/Include/stm32f767xx.h
index 0c22653..5d3dfbe 100644
--- a/Include/stm32f767xx.h
+++ b/Include/stm32f767xx.h
@@ -15660,6 +15660,9 @@
 /*                                                                            */
 /******************************************************************************/
 /* Bit definition for Ethernet MAC Control Register register */
+#define ETH_MACCR_CSTF_Pos                            (25U)
+#define ETH_MACCR_CSTF_Msk                            (0x1UL << ETH_MACCR_CSTF_Pos) /*!< 0x02000000 */
+#define ETH_MACCR_CSTF                                ETH_MACCR_CSTF_Msk       /* CRC stripping for Type frames */
 #define ETH_MACCR_WD_Pos                              (23U)
 #define ETH_MACCR_WD_Msk                              (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
 #define ETH_MACCR_WD                                  ETH_MACCR_WD_Msk         /* Watchdog disable */
diff --git a/Include/stm32f769xx.h b/Include/stm32f769xx.h
index c2ce9d4..45a7a0f 100644
--- a/Include/stm32f769xx.h
+++ b/Include/stm32f769xx.h
@@ -15755,6 +15755,9 @@
 /*                                                                            */
 /******************************************************************************/
 /* Bit definition for Ethernet MAC Control Register register */
+#define ETH_MACCR_CSTF_Pos                            (25U)
+#define ETH_MACCR_CSTF_Msk                            (0x1UL << ETH_MACCR_CSTF_Pos) /*!< 0x02000000 */
+#define ETH_MACCR_CSTF                                ETH_MACCR_CSTF_Msk       /* CRC stripping for Type frames */
 #define ETH_MACCR_WD_Pos                              (23U)
 #define ETH_MACCR_WD_Msk                              (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
 #define ETH_MACCR_WD                                  ETH_MACCR_WD_Msk         /* Watchdog disable */
diff --git a/Include/stm32f777xx.h b/Include/stm32f777xx.h
index d4c2783..f2081f0 100644
--- a/Include/stm32f777xx.h
+++ b/Include/stm32f777xx.h
@@ -15953,6 +15953,9 @@
 /*                                                                            */
 /******************************************************************************/
 /* Bit definition for Ethernet MAC Control Register register */
+#define ETH_MACCR_CSTF_Pos                            (25U)
+#define ETH_MACCR_CSTF_Msk                            (0x1UL << ETH_MACCR_CSTF_Pos) /*!< 0x02000000 */
+#define ETH_MACCR_CSTF                                ETH_MACCR_CSTF_Msk       /* CRC stripping for Type frames */
 #define ETH_MACCR_WD_Pos                              (23U)
 #define ETH_MACCR_WD_Msk                              (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
 #define ETH_MACCR_WD                                  ETH_MACCR_WD_Msk         /* Watchdog disable */
diff --git a/Include/stm32f779xx.h b/Include/stm32f779xx.h
index 5887bac..a615058 100644
--- a/Include/stm32f779xx.h
+++ b/Include/stm32f779xx.h
@@ -16048,6 +16048,9 @@
 /*                                                                            */
 /******************************************************************************/
 /* Bit definition for Ethernet MAC Control Register register */
+#define ETH_MACCR_CSTF_Pos                            (25U)
+#define ETH_MACCR_CSTF_Msk                            (0x1UL << ETH_MACCR_CSTF_Pos) /*!< 0x02000000 */
+#define ETH_MACCR_CSTF                                ETH_MACCR_CSTF_Msk       /* CRC stripping for Type frames */
 #define ETH_MACCR_WD_Pos                              (23U)
 #define ETH_MACCR_WD_Msk                              (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
 #define ETH_MACCR_WD                                  ETH_MACCR_WD_Msk         /* Watchdog disable */
diff --git a/Source/Templates/gcc/startup_stm32f722xx.s b/Source/Templates/gcc/startup_stm32f722xx.s
index f721dda..d4b23ed 100644
--- a/Source/Templates/gcc/startup_stm32f722xx.s
+++ b/Source/Templates/gcc/startup_stm32f722xx.s
@@ -60,6 +60,9 @@
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
 
+/* Call the clock system intitialization function.*/
+  bl  SystemInit 
+
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
   ldr r1, =_edata
@@ -91,8 +94,6 @@
   cmp r2, r4
   bcc FillZerobss
 
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f723xx.s b/Source/Templates/gcc/startup_stm32f723xx.s
index 33b9861..ab6f684 100644
--- a/Source/Templates/gcc/startup_stm32f723xx.s
+++ b/Source/Templates/gcc/startup_stm32f723xx.s
@@ -59,6 +59,9 @@
   .type  Reset_Handler, %function
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
+  
+/* Call the clock system intitialization function.*/
+  bl  SystemInit 
 
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
@@ -91,8 +94,6 @@
   cmp r2, r4
   bcc FillZerobss
 
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f730xx.s b/Source/Templates/gcc/startup_stm32f730xx.s
index 2b4f142..6f45bb9 100644
--- a/Source/Templates/gcc/startup_stm32f730xx.s
+++ b/Source/Templates/gcc/startup_stm32f730xx.s
@@ -60,6 +60,9 @@
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
 
+/* Call the clock system intitialization function.*/
+  bl  SystemInit 
+
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
   ldr r1, =_edata
@@ -91,8 +94,6 @@
   cmp r2, r4
   bcc FillZerobss
 
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f732xx.s b/Source/Templates/gcc/startup_stm32f732xx.s
index 4018e33..8266a22 100644
--- a/Source/Templates/gcc/startup_stm32f732xx.s
+++ b/Source/Templates/gcc/startup_stm32f732xx.s
@@ -59,6 +59,9 @@
   .type  Reset_Handler, %function
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
+  
+/* Call the clock system intitialization function.*/
+  bl  SystemInit   
 
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
@@ -91,8 +94,6 @@
   cmp r2, r4
   bcc FillZerobss
 
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f733xx.s b/Source/Templates/gcc/startup_stm32f733xx.s
index d630e91..2b58ed4 100644
--- a/Source/Templates/gcc/startup_stm32f733xx.s
+++ b/Source/Templates/gcc/startup_stm32f733xx.s
@@ -59,6 +59,9 @@
   .type  Reset_Handler, %function
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
+  
+/* Call the clock system intitialization function.*/
+  bl  SystemInit   
 
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
@@ -91,8 +94,6 @@
   cmp r2, r4
   bcc FillZerobss
 
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f745xx.s b/Source/Templates/gcc/startup_stm32f745xx.s
index 0024261..e5ce777 100644
--- a/Source/Templates/gcc/startup_stm32f745xx.s
+++ b/Source/Templates/gcc/startup_stm32f745xx.s
@@ -60,6 +60,9 @@
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
 
+/* Call the clock system intitialization function.*/
+  bl  SystemInit   
+
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
   ldr r1, =_edata
@@ -91,8 +94,6 @@
   cmp r2, r4
   bcc FillZerobss
 
-/* Call the clock system initialization function.*/
-  bl  SystemInit   
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f746xx.s b/Source/Templates/gcc/startup_stm32f746xx.s
index 4af984f..e8c495b 100644
--- a/Source/Templates/gcc/startup_stm32f746xx.s
+++ b/Source/Templates/gcc/startup_stm32f746xx.s
@@ -59,6 +59,9 @@
   .type  Reset_Handler, %function
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
+  
+/* Call the clock system intitialization function.*/
+  bl  SystemInit   
 
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
@@ -90,9 +93,7 @@
 LoopFillZerobss:
   cmp r2, r4
   bcc FillZerobss
-
-/* Call the clock system initialization function.*/
-  bl  SystemInit   
+  
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f750xx.s b/Source/Templates/gcc/startup_stm32f750xx.s
index 63cf9d3..e3f4fbb 100644
--- a/Source/Templates/gcc/startup_stm32f750xx.s
+++ b/Source/Templates/gcc/startup_stm32f750xx.s
@@ -60,6 +60,9 @@
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
 
+/* Call the clock system intitialization function.*/
+  bl  SystemInit   
+
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
   ldr r1, =_edata
@@ -90,9 +93,7 @@
 LoopFillZerobss:
   cmp r2, r4
   bcc FillZerobss
-
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
+  
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f756xx.s b/Source/Templates/gcc/startup_stm32f756xx.s
index 3588b24..b25e75b 100644
--- a/Source/Templates/gcc/startup_stm32f756xx.s
+++ b/Source/Templates/gcc/startup_stm32f756xx.s
@@ -60,6 +60,9 @@
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
 
+/* Call the clock system intitialization function.*/
+  bl  SystemInit   
+
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
   ldr r1, =_edata
@@ -91,8 +94,7 @@
   cmp r2, r4
   bcc FillZerobss
 
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
+
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f765xx.s b/Source/Templates/gcc/startup_stm32f765xx.s
index f39f6bf..135012f 100644
--- a/Source/Templates/gcc/startup_stm32f765xx.s
+++ b/Source/Templates/gcc/startup_stm32f765xx.s
@@ -60,6 +60,9 @@
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
 
+/* Call the clock system intitialization function.*/
+  bl  SystemInit   
+
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
   ldr r1, =_edata
@@ -90,9 +93,6 @@
 LoopFillZerobss:
   cmp r2, r4
   bcc FillZerobss
-
-/* Call the clock system initialization function.*/
-  bl  SystemInit   
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f767xx.s b/Source/Templates/gcc/startup_stm32f767xx.s
index 9c4bc40..1ea18b0 100644
--- a/Source/Templates/gcc/startup_stm32f767xx.s
+++ b/Source/Templates/gcc/startup_stm32f767xx.s
@@ -60,6 +60,9 @@
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
 
+/* Call the clock system intitialization function.*/
+  bl  SystemInit   
+
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
   ldr r1, =_edata
@@ -90,9 +93,7 @@
 LoopFillZerobss:
   cmp r2, r4
   bcc FillZerobss
-
-/* Call the clock system initialization function.*/
-  bl  SystemInit   
+  
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f769xx.s b/Source/Templates/gcc/startup_stm32f769xx.s
index 3789b70..aaa08a7 100644
--- a/Source/Templates/gcc/startup_stm32f769xx.s
+++ b/Source/Templates/gcc/startup_stm32f769xx.s
@@ -59,6 +59,9 @@
   .type  Reset_Handler, %function
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
+ 
+/* Call the clock system intitialization function.*/
+  bl  SystemInit   
 
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
@@ -90,9 +93,7 @@
 LoopFillZerobss:
   cmp r2, r4
   bcc FillZerobss
-
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
+   
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f777xx.s b/Source/Templates/gcc/startup_stm32f777xx.s
index a627bf9..43401dc 100644
--- a/Source/Templates/gcc/startup_stm32f777xx.s
+++ b/Source/Templates/gcc/startup_stm32f777xx.s
@@ -59,6 +59,9 @@
   .type  Reset_Handler, %function
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
+  
+/* Call the clock system intitialization function.*/
+  bl  SystemInit 
 
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
@@ -91,8 +94,6 @@
   cmp r2, r4
   bcc FillZerobss
 
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/
diff --git a/Source/Templates/gcc/startup_stm32f779xx.s b/Source/Templates/gcc/startup_stm32f779xx.s
index 5149865..c3d1140 100644
--- a/Source/Templates/gcc/startup_stm32f779xx.s
+++ b/Source/Templates/gcc/startup_stm32f779xx.s
@@ -60,6 +60,9 @@
 Reset_Handler:  
   ldr   sp, =_estack      /* set stack pointer */
 
+/* Call the clock system intitialization function.*/
+  bl  SystemInit 
+
 /* Copy the data segment initializers from flash to SRAM */  
   ldr r0, =_sdata
   ldr r1, =_edata
@@ -90,9 +93,7 @@
 LoopFillZerobss:
   cmp r2, r4
   bcc FillZerobss
-
-/* Call the clock system intitialization function.*/
-  bl  SystemInit   
+  
 /* Call static constructors */
     bl __libc_init_array
 /* Call the application's entry point.*/