2013-08-06 06:27 AM
Hello!
I'm can't programming option byte in the stm8s105c6t6 into my board stm8s-discovery. This code: mov FLASH_DUKR,♯$56; mov FLASH_DUKR,♯$AE; ld A,♯%00001100; IWDG_HW and LSI_ EN set ldw X,♯$4805 ld (X),A incw X cpl A ld (X),A Here I read option bytes, they unchanged. Can you Help me? #stm8 #option-bytes2013-09-04 11:41 AM
I have similar problem that I can't change option byte(wait state) by program for STM8S207.
2013-09-05 07:58 AM
ST manuals can be somewhat obscure. First check section 4.5.3 - Note that the access method is the same as for data memory using 0xAE then 0x56 and then setting the OPT bit in the FLASH_CR2.
mov FLASH_DUKR,#$AE; FLASH_RASS_KEY2 mov FLASH_DUKR,#$56; FLASH_RASS_KEY1 mov FLASH_CR2,#$80; OPT bit to enable Option byte programming mov FLASH_NCR2,#$7f; ld A,#%00001100; IWDG_HW and LSI_ EN set ldw X,#$4805 ld (X),A incw X cpl A ld (X),A Hope this works for you jdf