Your code is useful and give me a start point. I will download FESL to see what is inside. I am using IAR KickStart Kit for ARM91x and wonder whether the SD/MMC hardware of the board is working. I set P57 as output but it never goes low even if I call GPIO_WriteBit(GPIO5, GPIO_Pin_7, Bit_RESET) again and again. I am sure you are very welcome to publish your code under the term of GNU into this community. Thank you very much. Yuantu