2013-04-16 05:18 AM
Hi,
I found a problem while writing to the EEPROM. The uC type is STM8af6289. This part of the program is the folowing: initializing part: void FLASH_Config(void) { FLASH_SetProgrammingTime(FLASH_PROGRAMTIME_STANDARD); FLASH_Unlock(FLASH_MEMTYPE_DATA); while (FLASH_GetFlagStatus(FLASH_FLAG_DUL) == RESET); } main part program: int main() { FLASH_Config(); while(1) { if(FLASH_GetFlagStatus(FLASH_FLAG_EOP)==RESET) { *(PointerAttr uint8_t*) (uint16_t)0x4001 = 0x55; } GPIO_WriteReverse(LED2_GPIO_PORT, LED2_GPIO_PINS); } } As it says, I should see on the oscilloscope a signal with 1-2 us timing. But I can see a square wave signal having about 50% duty cicle and the timing is about 10 ms. Do anyone have an idea what should I do? Thank you for your help. Gergo #eeprom-rww2013-04-27 03:02 AM
Never tried af series, but...
Possibly your CPU runs at low CPU frequency (something like 128 kHz internal oscillator) and all the timings are much longer than expected