Added fsmc code