Have you copy the Trim value from the non volatile memory to the TRIM register in your code?
/* System clock initialization */
/*lint -save -e923 Disable MISRA rule (11.3) checking. */
if (*(uint8_t*)0xFF6F != 0xFF) { /* Test if the device trim value is stored on the specified address */
ICS_C3 = *(uint8_t*)0xFF6F; /* Initialize ICS_C3 register from a non volatile memory */
ICS_C4 = (uint8_t)((*(uint8_t*)0xFF6E) & (uint8_t)0x01); /* Initialize ICS_C4 register from a non volatile memory */
}
/*lint -restore Enable MISRA rule (11.3) checking. */
/* ICS_C1: CLKS=0,RDIV=0,IREFS=1,IRCLKEN=1,IREFSTEN=0 */
ICS_C1= 0x06; /* Initialization of the ICS control register 1 */
/* ICS_C2: BDIV=1,LP=0,??=0,??=0,??=0,??=0 */
ICS_C2 = 0x20; /* Initialization of the ICS control register 2 */
/* ICS_C4: LOLIE=0,CME=0 */
ICS_C4 =A0;
I hope this will help you