![PMD Atlas Compact Скачать руководство пользователя страница 82](http://html1.mh-extra.com/html/pmd/atlas-compact/atlas-compact_complete-technical-reference_1569420082.webp)
Operation
82
Atlas® Digital Amplifier Complete Technical Reference
4
As detailed in
Section 4.13, “Non-Volatile (NVRAM) Storage”
if used, the NVRAM memory area should follow the
PMD Structured data Format. Failure to do so may result in unexpected behavior of the Atlas unit during power up
or during operation. If not used the NVRAM area does not need to be written to or otherwise initialized.
The following sequence is used to store command initialization data or other data to the non-volatile memory area:
1
Send a
DriveNVRAM
command with an argument of
NVRAMMode
. Sending this command places Atlas in
a special mode allowing it to store memory into the NVRAM. Before proceeding the external controller
should delay 1 second or more.
2
Send a
DriveNVRAM
command with an argument of
EraseNVRAM
. This command will erase the entire
NVRAM memory area. Before proceeding the external controller should delay four seconds or more.
3
For each 16-bit word of data that is to be written into the NVRAM area the command
DriveNVRAM
with
an argument of
Write
is sent, along with the data word to be written. After each word is written Atlas
increments an internal pointer so that subsequent data words are automatically stored in the correct location.
4
Check for NVRAM write completion by sending a
NOP
command until a valid checksum is returned. In
most cases this will occur right away, however due to the nature of NVRAM writing there may be times when
this takes up to a millisecond. Once a valid checksum is returned check the Instruction error bit of the
returned SPI Status register. If an error is recorded the entire sequence described above must be repeated
from step 2. If no error is recorded continue by repeating steps 3 & 4 until all data is written.
5
Once all data is successfully written the external controller should send a
Reset
command, which will cause
Atlas to reboot and execute a power up sequence. Note that this power-up sequence will include processing
the stored data sent using the above sequence.
If an error occurs when processing NVRAM the Instruction Error event bit will be set and the
GetInstructionError
command may be used to read the error code.
4.14.2 Reading Non-Volatile Memory
If desired, it is possible to directly read the NVRAM memory area using buffer commands. See
for more information on Atlas buffer processing.
To read the whole NVRAM area the buffer location should be set to 0x20000000 and the length should be set to 1,024.
The standard
ReadBuffer16
command can be used.
4.15 SPI Communications Overview
Atlas uses an SPI (Serial Peripheral Interface) digital connection to communicate with the external controller. This
connection is used to setup Atlas parameters, specify voltage or torque output values, monitor Atlas operation, as well
as other functions.
Data stored into the NVRAM area must follow the PSF format detailed in
. Failure to do so may result in unexpected behavior of the Atlas.
It is not possible to write to the NVRAM area using the buffer commands. The procedure outlined in
must be used to write data to the NVRAM area.