cancel
Showing results for 
Search instead for 
Did you mean: 

ICP(SWIM) Programming

ivansid
Associate
Posted on July 30, 2010 at 23:08

ICP(SWIM) Programming

1 REPLY 1
simonqian2
Associate II
Posted on May 17, 2011 at 15:09

> 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.