DocID14024 Rev 4 15/39
UM0470 Single wire interface module (SWIM)
38
3.5.3 WOTF: write on-the-fly
1 command followed by the number of bytes to be written followed by the address on three
bytes.
Parameters:
N The 8 bits are the number of bytes to write (from 1 to 255)
@E/H/L: This is the 24-bit address to be accessed.
D[...]: These are the data bytes to write in the memory space
If a byte D [i] has not been written when the following byte D [i+1] arrives, D [i+1] will be
followed by a NACK. In this case the host must send D [i+1] again until it is acknowledged.
For the last byte, if it is not yet written when a new command occurs, the new command will
receive a NACK and will not be taken into account.
If the SWIM_DM bit is cleared, the WOTF can only be done on the SWIM internal registers.
3.6 SWIM communication reset
In case of a problem during the communication, the host can reset the communication and
the ongoing command by sending 128 x SWIM clocks periods low on the SWIM pin. If the
SWIM logic detects that the SWIM pin is low for more than 64 x SWIM clocks periods, it will
reset the communication state machine and
will switch the SWIM to low-speed mode
(SWIM_CSR.HS <- 0)
. This is done to allow a variation in the frequency of the internal RC
oscillator.
In response to this communication reset, the SWIM sends the synchronization frame which
is 128 x SWIM clock periods low on the DBG pin.
WOTF N@E@H@LD[@]D[@+N]