![PMD Atlas Compact Скачать руководство пользователя страница 96](http://html1.mh-extra.com/html/pmd/atlas-compact/atlas-compact_complete-technical-reference_1569420096.webp)
96
Atlas® Digital Amplifier Complete Technical Reference
6
DriveNVRAM (cont.)
Description
(cont.)
NVRAM bits may be cleared individually, but may only be set as an entire block. This operation is
called an erase, in the erased state each word reads as 0xFFFF. Typically NVRAM will be erased
each time new initialization instructions are written, but this is not absolutely required.
In order to erase NVRAM, use the command
DriveNVRAM
1 0, and follow the wait sequence
shown for entering NVRAM mode.
After erasing NVRAM, 16-bit words may be written, beginning at location zero. After writing each
word an internal pointer will be advanced to the next location. It is the user’s responsibility to keep
track of the current write position, it cannot be directly read.
In order to write a single word, use the command
DriveNVRAM 2 Value
, where Value may be any
16-bit word. After writing the wait sequence should be followed.
If it is desired to skip a sequence of locations that already have the correct values the command
DriveNVRAM 8 N
may be used, where N is the number of words to skip. No wait procedure is
required after this command.
In order to speed up long NVRAM writes a block write facility is provided. A block write is begun
by using the
DriveNVRAM 3 N
command, where N is the number of words that will be written as
a block. N may be at most 32. No wait procedure is required after this command.
The values to write are provided using a torque-like command, the first header word of this
command is 0x0F00, and the second word is the value to write to an internal buffer.
Once all the values of a write block have been sent the command
DriveNVRAM 4
checksum should
be sent to start the actual write process. The checksum argument is a 16-bit ones complement
checksum over all of the words to be written, if Atlas does not verify the checksum it will respond
with an NVRAM checksum Error (25). If the checksum is verified then the success code will be
returned, and the wait procedure should be followed.
When all NVRAM operations are complete it is necessary to either power cycle Atlas or send a
Reset command in order to exit NVRAM mode.
It is not necessary to enter NVRAM mode in order to read the contents of NVRAM, that may be
done by using the SetBufferStart command to specify the NVRAM base, 0x20000000, as the start
of a buffer, and the ReadBuffer16 command to retrieve NVRAM values.
Restrictions
Before entering NVRAM mode motor output must be disabled by setting the operating mode to 1.
Most ordinary commands are not supported in NVRAM mode.
see
SetOperatingMode
,
SetBufferStart
,
ReadBuffer16