3.5.2 Write Memory Command
This HCI-ISDAP command allows the host to write values to the internal nonvolatile memory of the BM70/71 device. The BM70/71 contains a Harvard memory architecture (separate code and data address spaces) with segmented memory. Each of the four-memory bank or segments in the code space, and two memory bank or segments in the data space are 64 Kbytes in size. The most significant 16 bits of the address value are used to identify the target memory bank/segments, starting at a logical value of zero. The least significant 16 bits are used to address a specific memory location with the memory bank or segment.
When the host or programmer is initially setting up communication with the BM70/71, the host discovers the maximum packet (HCI ACL Data or HCI Command packets) length the BM70/71 can process (see section Read Buffer Size). The host must not exceed this packet length value when sending programming data to the BM70/71 using HCI-ISDAP packets. In most cases, it is common for the maximum packet length of the BM70/71 device to be a smaller value than the maximum size of an HCI-ISDAP packet. Generally, the maximum packet length the BM70/71 can process is approximately 250 bytes. Whereas, the maximum allowable packet length of an HCI ACL Data packet can be up to 65535 bytes, including a few bytes of overhead. (Embedding HCI-ISDAP programming protocol in a HCI Data Packet reduces this value to 32767 bytes of data in a single packet.) This means, even though the user can technically send up to 65535 bytes of programming data in a single packet, the BM70/71 device can only receive a packet length of approximately 250 bytes.
To reduce communication overhead when performing large write operations where entire banks of
memory will be programmed, the HCI-ISDAP write command has a setting embedded in the
HCI-ISDAP Data Length field. The most significant bit in the 16-bit field represents a
flag, referred to as the continue flag. If this flag is set to a ‘1
’,
all subsequent write messages must be sent as Write Continue Command (HCI-ISDAP opcode -
0x0001) packets. The rest of the 16-bit ISDAP Data Length field (Bit[14:0]) represents
the total amount of data in this packet. The size field of the HCI-ISDAP Write Command
indicates the total amount of data to be programmed into the device (this includes all
subsequent HCI-ISDAP Write Continue packets). With Write Continue operations, the BM70/71 device assumes all writes to memory are
sequential, starting from the address value originally sent by the host in the first
HCI-ISDAP Write Memory Command packet. These write continue operations allow the user to
use the smaller Write Continue packet (see Write Continue Command) to reduce communication
overhead.