23.5.3.7.3 Writing a Packet from the Client Key Bus

To write a packet from the client key bus interface (payload only), follow the steps below:

  1. Write OTPC_MR.ADDR to ‘0’ and set NPCKT.


    Depending on the content of the temporary registers, an automatic flush can be triggered. If an automatic flush is started, OTPC_SR.FLUSH is set and OTPC_ISR.EOF is raised at the completion of the flush. It is mandatory to wait for the end of the flush.

  2. Write the header value in the OTPC_HR register. The value of PACKET must be KEY.
  3. Initiate a data transfer to the OTP memory through the TRNG host key bus.
  4. Wait for the data transfer completion.
  5. Check that no error happened during the key transfer (OTPC_ISR.KBERR must be cleared).
  6. Write 0x7167 in the OTPC_CR.KEY field and ‘1’ to OTPC_CR.PGM.
  7. Before the write operation in the OTP memory, the OTPC checks the consistency of the packet and that the packet does not overlap on any existing packet. In case of error, OTPC_ISR.WERR is set and the write operation is cancelled. The end of the programming operation is indicated by OTPC_ISR.EOP=1 and/or OTPC_SR.PGM=0.

If the PACKET field is changed before programming, the payload is erased (and lost).