2010-07-30 02:08 PM
ICP(SWIM) Programming
2011-05-17 06:09 AM
> Should I send parity bit and wait for acknowledge or just push eight bits and then release line?
parity bit should always be sent, and ack will be sent out by STM8. Actually, after you send the start sequency, an ack will also be sent out by STM8. Here is code to unlock flash and eeprom:static void stm8_unlock_eeprom_option(uint32_t dukr)
{ swim_wotf_reg(dukr, 0xAE, 1); swim_wotf_reg(dukr, 0x56, 1); }static void stm8_unlock_flash(uint32_t pukr)
{ swim_wotf_reg(pukr, 0x56, 1); swim_wotf_reg(pukr, 0xAE, 1); } Note that pukr maybe different between STM8S(A) and STM8L.