Sie sind nicht angemeldet.

Anmelden
Diese Seite kann nicht editiert werden.
 
 
 

Feature Report Protocol

Von $1

    Inhaltsverzeichnis
    Um zurückzugehen, müssen die aktuelle und die ältere Version mit Hilfe der Historie verglichen werden.

    Kombinierter Revisionsvergleich

    Vergleich der Version vom 20:06, 28 Feb 2015 von stephan mit der Version modifiziert am 15:21, 1 Mar 2015 von stephan.

    Preface

    This is the documentation of the low level feature report protocol of the Arcaze USB-Interface.

    Please do only use this low level protocol, if you know why you're doing it. When programming on a Windows platform, using the supplied Arcaze DLL is generally preferable, as it simplifies and harmonizes usage and also covers changes in the low level protocol. Changes are not overly common, but be aware that the feature report commands are subject to change (as opposed to the DLL functions).

    Main reason to use the low level feature report protocol, would platform independence, as currently there is no Arcaze DLL implementation for other platforms than MS Windows.

    Command OverviewIDsBereich bearbeiten

    All command IDs are noted in decimal.

    Memory Access Commands

    These commands are used to write a new configuration to the Arcaze USB-Interface.
     

    Command ID Description
    CmdIdReadRam 2  
    CmdIdWriteToRam 3  
    CmdIdCopyFlashToRam 4  
    CmdIdClearFlash 5  
    CmdIdProgRamToFlash 6  
    CmdIdClearRam 7  

    System Commands

    Command ID DescriptionName
    CmdIdSetPadMode 9 obsolete
    CmdIdReadDebugInfo 10 only usable in manufacturing/production environment
    CmdIdValidateConfig 12  
    CmdIdInvalidateConfig 13  
    CmdIDEnumerate 14  
    CmdIdReadBootSerialNumber 15  
    CmdIdReadConfigSerialNumber 16  
    CmdIdReadStatus 17  
    CmdIdReadConfigNumber 18  
    CmdIdGetPadMode 20  
    CmdIdStartMacros 21  
    CmdIdStopMacros 22  
    CmdIdPrintMacros 23  
    CmdIdSetTimerIRQ 24  
    CmdIdPrintInReports 25 only usable in manufacturing/production environment

    Onboard Port Commands

    Command ID Description
    CmdIdReadPorts 8  
    CmdIdPrintADC 26 only usable in manufacturing/production environment
    CmdIdReadADC 27  
    CmdIdSetConfig 28  
    CmdIdSetPinDirection 29  
    CmdIdSetPin 30  
    CmdIdSetPortDirection 31  
    CmdIdSetPort 32  

    Quadrature Encoder Commands

    Command ID Description
    CmdIdReadQuadratureEncoders 44  
    CmdIdReadPortsWithHistory 45  

    Display Driver Commands

    Command ID Description
    CmdIdMax7219DisplayInit 33  
    CmdIdMax7219WriteReg 34  
    CmdIdMax7219ReadReg 35  
    CmdIdMax7219WriteDigits 36  

    LED Driver 2 Commands2

    Command ID Description
    CmdIdTlc5926Init 37CmdIdReadRam  
    CmdIdTlc5926WriteLeds3 38CmdIdWriteToRam  
    CmdIdTlc5926StrobeEnable4 39CmdIdCopyFlashToRam  

    LED Driver 3 Commands

    Command ID Description
    CmdIdTlc5943Init5 40CmdIdClearFlash  
    CmdIdTlc5943WriteLeds1Bit6 41CmdIdProgRamToFlash  
    CmdIdTlc5943WriteLeds8Bit7 42CmdIdClearRam  
    CmdIdTlc5943Strobe8 43CmdIdReadPorts  

    {{ simpsol.pagebreak{} }}

    Command Descriptions

    Attention: Note that, when using the Microsoft UsbHid implementation, there has to be a prefix zero byte attached to all reports defined below. This may not be required on different platforms.

    Memory Access Commands

    CMD_READ_RAM (2)

    Read Data from the TransferRAM. This is mainly used together with CMD_COPY_FLASH_TO_RAM.

    The Out Feature Report sets the base address of the data to be read. With every In Feature Report the base address is incremented by the number of received bytes. Therefore it's also possible to do "burst reads" with one Out Report, setting the start address and multiple In Reports to read the data continuously.

    Out Report
    Address Content Value Length (Bytes) Remarks
    09 CommandCmdIdSetPadMode 0d2 1  CMD_READ_RAM
    110 AddressCmdIdReadDebugInfo   2  Start address for read. This is the relative address inside the TransferRAM, first byte has address 0.
    3…6312 CmdIdValidateConfig       Not used

    No length is submitted. The In report is always completely filled until the end of the RAM block is reached or the internal number of valid bytes is reached.

    In Report 
    Address Content Value Length (Bytes) Remarks
    013 CommandCmdIdInvalidateConfig 0d2 1 CMD_READ_TRANSFER_RAM
    1 RetVal   1 Return Value
    214 AddressCmdIDEnumerate   2 Base address of Data
    415 LengthCmdIdReadBootSerialNumber   2 Number of valid bytes in this report
    6…6316 PayloadCmdIdReadConfigSerialNumber   58 Payload data

    In reports can be polled until end of RAM block is reached (address 0x0fff). Continued reads supply all zeros.

    Additionally note that the firmware also respects the number of valid bytes in RAM. So, if by a previous command only the first 256 bytes have been written, it's not possible to read above address 0x00ff. When reading above, the data is all zero.

    {{ simpsol.pagebreak{} }}

    CMD_WRITE_RAM (3)

    Write Data to TransferRAM.

    This Out Feature Report can write a maximum of 58 bytes into TransferRAM. Every Out Feature Report sets the destination address, therefore there is no burst mode here.

    Important: Note that you have to issue a CMD_CLEAR_FLASH_RAM before being able to write to Flash RAM for security reasons!

    Out Report
    Address Content Value Length (Bytes) Remarks
    017 CommandCmdIdReadStatus 0d3 1 CMD_WRITE_RAM
    1 Address   2 Start address for write. This is the relative address inside the Flash RAM, first byte has address 0.
    318 LengthCmdIdReadConfigNumber   2 Number of bytes to write in this report.
    5…6320 CmdIdGetPadMode      Not used

    It's possible to write to any address between 0x0000 and 0x0fff. All other writes are ignored and an RETVAL_WRITE_OUTSIDE_RAM error is issued.

    {{ simpsol.pagebreak{} }}

    CMD_COPY_FLASH_TO_RAM (4)

    Copies addressed data from a flash sector to the TransferRAM.

    Out Report
    Address Content Value Length (Bytes) Remarks
    021 CommandCmdIdStartMacros 0d4 1 CMD_COPY_FLASH_TO_RAM
    1 SectorID   1 Sector ID to be read. Refer to sector table.
    2…6322 CmdIdStopMacros      Not used

    {{ simpsol.pagebreak{} }}

    CMD_CLEAR_FLASH (5)

    Erase a flash sector.

    Access restrictions apply. If a user is not entitled to erase this sector it is denied. Refer to flash sector table to see which sectors allow erasing.

    Out Report
    Address Content Value Length (Bytes) Remarks
    023 CommandCmdIdPrintMacros 0d5 1  CMD_CLEAR_FLASH
    124 SectorIDCmdIdSetTimerIRQ   1  Sector ID to be read. Refer to sector table.
    2…6325 CmdIdPrintInReports       Not used

    {{ simpsol.pagebreak{} }}

    CMD_COPY_RAM_TO_FLASH (6)

    Programs Transfer RAM contents into Flash Memory.

    Out Report
    Address Content Value Length (Bytes) Remarks
    026 CommandCmdIdPrintADC 0d6 1 CMD_COPY_RAM_TO_FLASH
    1 SectorID   1 SectorID 
    3...6327 CmdIdReadADC      Not used
    In  Report
    Address Content Value Length (Bytes) Remarks
    028 CommandCmdIdSetConfig 0d6 1  CMD_COPY_RAM_TO_FLASH
    129 Return ValueCmdIdSetPinDirection   1  Return Value refer to return value table

    {{ simpsol.pagebreak{} }}

    CMD_CLEAR_RAM (7)

    Clears the complete TransferRAM (4kBytes total) by overwriting all bytes with 0xFF.

    Important: Note that you have to issue a CMD_CLEAR_RAM before being allowed to write to TransferRAM for security reasons! The number of valid data bytes in TransferRAM is set to 0x1000 by this command, so all data bytes can be read and overwritten afterwards.

    Out Report
    Address Content Value Length (Bytes) Remarks
    030 CommandCmdIdSetPin 0d7 1  CMD_CLEAR_RAM
    1...6331 CmdIdSetPortDirection       Not used

    {{ simpsol.pagebreak{} }}

    Onboard Port Commands

    CMD_ID_READ_PORTS (8)

    Reads states of internal digital ports.

    Out Report
    Address Content Value Length (Bytes) Remarks
    032 CommandCmdIdSetPort 0d8 1 CMD_ID_READ_PORTS
    1...63       Not used
    In  Report
    Address Content Value Length (Bytes) Remarks
    033 CommandCmdIdMax7219DisplayInit 0d 1  CMD_
    134 Return ValueCmdIdMax7219WriteReg   1  

    {{ simpsol.pagebreak{} }}

    CMD_READ_ADC (10)

    Reads 8 bit representations of ADC values of the 6 internal ADCs. This will soon be replaced by a 16 bit version.

    Out Report
    Address Content Value Length (Bytes) Remarks
    035 CommandCmdIdMax7219ReadReg 0d10 1 CMD_
    1...63       Not used
    In  Report
    Address Content Value Length (Bytes) Remarks
    036 CommandCmdIdMax7219WriteDigits 0d10 1 CMD_READ_ADC
    1 ADC port 0 (AIN 1) value   1  
    237 ADC port 1 (AIN 2) valueCmdIdTlc5926Init   1  
    338 ADC port 2 (AIN 3) valueCmdIdTlc5926WriteLeds   1  
    439 ADC port 3 (AIN 4) valueCmdIdTlc5926StrobeEnable   1  
    540 ADC port 4 (AIN 5) valueCmdIdTlc5943Init   1  
    641 ADC port 5 (AIN 6) valueCmdIdTlc5943WriteLeds1Bit   1  
    7...6342 CmdIdTlc5943WriteLeds8Bit      not used

    {{ simpsol.pagebreak{} }}

    ...

    Command Templates

    CMD_ (xxxxxxxxx)

    Description

    Out Report
    Address Content Value Length (Bytes) Remarks
    043 CommandCmdIdTlc5943Strobe 0d 1 CMD_
    1 xx   1  
    3...6344 CmdIdReadQuadratureEncoders      Not used
    In  Report
    Address Content Value Length (Bytes) Remarks
    045 CommandCmdIdReadPortsWithHistory 0d 1  CMD_
    1 Return Value   1  

    {{ simpsol.pagebreak{} }}

    Andere Änderungen:

    1. /body/table/@border: keine ⇒ "1"
    2. /body/table/@cellpadding: keine ⇒ "1"
    3. /body/table/@cellspacing: keine ⇒ "1"
    4. /body/table/@style: keine ⇒ "width: 80%; table-layout: fixed;"
    5. /body/table[2]/thead/tr/th/@colspan: keine ⇒ "3"
    6. /body/table[2]/thead/tr/th[3]/@colspan: keine ⇒ "3"
    7. /body/table[3]/thead/tr/th/@colspan: keine ⇒ "3"
    8. /body/table[3]/tbody/tr/td/@colspan: keine ⇒ "3"
    9. /body/table[6]/tbody/tr/td[2]/@align: keine ⇒ "center"
    10. /body/table[6]/tbody/tr/td[3]/@colspan: keine ⇒ "3"
    11. /body/table[6]/tbody/tr[2]/td/@colspan: keine ⇒ "3"
    12. /body/table[6]/tbody/tr[2]/td[2]/@align: keine ⇒ "center"
    13. /body/table[6]/tbody/tr[2]/td[3]/@colspan: keine ⇒ "3"
    14. /body/table[6]/tbody/tr[3]/td/@colspan: keine ⇒ "3"
    15. /body/table[6]/tbody/tr[3]/td[2]/@align: keine ⇒ "center"
    16. /body/table[6]/tbody/tr[3]/td[3]/@colspan: keine ⇒ "3"
    17. /body/table[7]/tbody/tr/td/@colspan: keine ⇒ "3"
    18. /body/table[7]/tbody/tr/td[2]/@align: keine ⇒ "center"
    19. /body/table[7]/tbody/tr/td[3]/@colspan: keine ⇒ "3"
    20. /body/table[7]/tbody/tr[2]/td/@colspan: keine ⇒ "3"
    21. /body/table[7]/tbody/tr[2]/td[2]/@align: keine ⇒ "center"
    22. /body/table[7]/tbody/tr[2]/td[3]/@colspan: keine ⇒ "3"
    23. /body/table[7]/tbody/tr[3]/td/@colspan: keine ⇒ "3"
    24. /body/table[7]/tbody/tr[3]/td[2]/@align: keine ⇒ "center"
    25. /body/table[7]/tbody/tr[3]/td[3]/@colspan: keine ⇒ "3"
    26. /body/table[7]/tbody/tr[4]/td/@colspan: keine ⇒ "3"
    27. /body/table[7]/tbody/tr[4]/td[2]/@align: keine ⇒ "center"
    28. /body/table[7]/tbody/tr[4]/td[3]/@colspan: keine ⇒ "3"

    Version vom 20:06, 28 Feb 2015

    Diese Revision wurde von stephan (Sperren) verändert

    Command IDs

    ID Name Description
    2 CmdIdReadRam  
    3 CmdIdWriteToRam  
    4 CmdIdCopyFlashToRam  
    5 CmdIdClearFlash  
    6 CmdIdProgRamToFlash  
    7 CmdIdClearRam  
    8 CmdIdReadPorts  
    9 CmdIdSetPadMode  
    10 CmdIdReadDebugInfo  
    12 CmdIdValidateConfig  
    13 CmdIdInvalidateConfig  
    14 CmdIDEnumerate  
    15 CmdIdReadBootSerialNumber  
    16 CmdIdReadConfigSerialNumber  
    17 CmdIdReadStatus  
    18 CmdIdReadConfigNumber  
    20 CmdIdGetPadMode  
    21 CmdIdStartMacros  
    22 CmdIdStopMacros  
    23 CmdIdPrintMacros  
    24 CmdIdSetTimerIRQ  
    25 CmdIdPrintInReports  
    26 CmdIdPrintADC  
    27 CmdIdReadADC  
    28 CmdIdSetConfig  
    29 CmdIdSetPinDirection  
    30 CmdIdSetPin  
    31 CmdIdSetPortDirection  
    32 CmdIdSetPort  
    33 CmdIdMax7219DisplayInit  
    34 CmdIdMax7219WriteReg  
    35 CmdIdMax7219ReadReg  
    36 CmdIdMax7219WriteDigits  
    37 CmdIdTlc5926Init  
    38 CmdIdTlc5926WriteLeds  
    39 CmdIdTlc5926StrobeEnable  
    40 CmdIdTlc5943Init  
    41 CmdIdTlc5943WriteLeds1Bit  
    42 CmdIdTlc5943WriteLeds8Bit  
    43 CmdIdTlc5943Strobe  
    44 CmdIdReadQuadratureEncoders  
    45 CmdIdReadPortsWithHistory  

    Version seit 15:21, 1 Mar 2015

    Diese Revision wurde von stephan (Sperren) verändert

    Preface

    This is the documentation of the low level feature report protocol of the Arcaze USB-Interface.

    Please do only use this low level protocol, if you know why you're doing it. When programming on a Windows platform, using the supplied Arcaze DLL is generally preferable, as it simplifies and harmonizes usage and also covers changes in the low level protocol. Changes are not overly common, but be aware that the feature report commands are subject to change (as opposed to the DLL functions).

    Main reason to use the low level feature report protocol, would platform independence, as currently there is no Arcaze DLL implementation for other platforms than MS Windows.

    Command OverviewBereich bearbeiten

    All command IDs are noted in decimal.

    Memory Access Commands

    These commands are used to write a new configuration to the Arcaze USB-Interface.
     

    Command ID Description
    CmdIdReadRam 2  
    CmdIdWriteToRam 3  
    CmdIdCopyFlashToRam 4  
    CmdIdClearFlash 5  
    CmdIdProgRamToFlash 6  
    CmdIdClearRam 7  

    System Commands

    Command ID Description
    CmdIdSetPadMode 9 obsolete
    CmdIdReadDebugInfo 10 only usable in manufacturing/production environment
    CmdIdValidateConfig 12  
    CmdIdInvalidateConfig 13  
    CmdIDEnumerate 14  
    CmdIdReadBootSerialNumber 15  
    CmdIdReadConfigSerialNumber 16  
    CmdIdReadStatus 17  
    CmdIdReadConfigNumber 18  
    CmdIdGetPadMode 20  
    CmdIdStartMacros 21  
    CmdIdStopMacros 22  
    CmdIdPrintMacros 23  
    CmdIdSetTimerIRQ 24  
    CmdIdPrintInReports 25 only usable in manufacturing/production environment

    Onboard Port Commands

    Command ID Description
    CmdIdReadPorts 8  
    CmdIdPrintADC 26 only usable in manufacturing/production environment
    CmdIdReadADC 27  
    CmdIdSetConfig 28  
    CmdIdSetPinDirection 29  
    CmdIdSetPin 30  
    CmdIdSetPortDirection 31  
    CmdIdSetPort 32  

    Quadrature Encoder Commands

    Command ID Description
    CmdIdReadQuadratureEncoders 44  
    CmdIdReadPortsWithHistory 45  

    Display Driver Commands

    Command ID Description
    CmdIdMax7219DisplayInit 33  
    CmdIdMax7219WriteReg 34  
    CmdIdMax7219ReadReg 35  
    CmdIdMax7219WriteDigits 36  

    LED Driver 2 Commands

    Command ID Description
    CmdIdTlc5926Init 37  
    CmdIdTlc5926WriteLeds 38  
    CmdIdTlc5926StrobeEnable 39  

    LED Driver 3 Commands

    Command ID Description
    CmdIdTlc5943Init 40  
    CmdIdTlc5943WriteLeds1Bit 41  
    CmdIdTlc5943WriteLeds8Bit 42  
    CmdIdTlc5943Strobe 43  

    {{ simpsol.pagebreak{} }}

    Command Descriptions

    Attention: Note that, when using the Microsoft UsbHid implementation, there has to be a prefix zero byte attached to all reports defined below. This may not be required on different platforms.

    Memory Access Commands

    CMD_READ_RAM (2)

    Read Data from the TransferRAM. This is mainly used together with CMD_COPY_FLASH_TO_RAM.

    The Out Feature Report sets the base address of the data to be read. With every In Feature Report the base address is incremented by the number of received bytes. Therefore it's also possible to do "burst reads" with one Out Report, setting the start address and multiple In Reports to read the data continuously.

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d2 1  CMD_READ_RAM
    1 Address   2  Start address for read. This is the relative address inside the TransferRAM, first byte has address 0.
    3…63        Not used

    No length is submitted. The In report is always completely filled until the end of the RAM block is reached or the internal number of valid bytes is reached.

    In Report 
    Address Content Value Length (Bytes) Remarks
    0 Command 0d2 1 CMD_READ_TRANSFER_RAM
    1 RetVal   1 Return Value
    2 Address   2 Base address of Data
    4 Length   2 Number of valid bytes in this report
    6…63 Payload   58 Payload data

    In reports can be polled until end of RAM block is reached (address 0x0fff). Continued reads supply all zeros.

    Additionally note that the firmware also respects the number of valid bytes in RAM. So, if by a previous command only the first 256 bytes have been written, it's not possible to read above address 0x00ff. When reading above, the data is all zero.

    {{ simpsol.pagebreak{} }}

    CMD_WRITE_RAM (3)

    Write Data to TransferRAM.

    This Out Feature Report can write a maximum of 58 bytes into TransferRAM. Every Out Feature Report sets the destination address, therefore there is no burst mode here.

    Important: Note that you have to issue a CMD_CLEAR_FLASH_RAM before being able to write to Flash RAM for security reasons!

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d3 1 CMD_WRITE_RAM
    1 Address   2 Start address for write. This is the relative address inside the Flash RAM, first byte has address 0.
    3 Length   2 Number of bytes to write in this report.
    5…63       Not used

    It's possible to write to any address between 0x0000 and 0x0fff. All other writes are ignored and an RETVAL_WRITE_OUTSIDE_RAM error is issued.

    {{ simpsol.pagebreak{} }}

    CMD_COPY_FLASH_TO_RAM (4)

    Copies addressed data from a flash sector to the TransferRAM.

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d4 1 CMD_COPY_FLASH_TO_RAM
    1 SectorID   1 Sector ID to be read. Refer to sector table.
    2…63       Not used

    {{ simpsol.pagebreak{} }}

    CMD_CLEAR_FLASH (5)

    Erase a flash sector.

    Access restrictions apply. If a user is not entitled to erase this sector it is denied. Refer to flash sector table to see which sectors allow erasing.

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d5 1  CMD_CLEAR_FLASH
    1 SectorID   1  Sector ID to be read. Refer to sector table.
    2…63        Not used

    {{ simpsol.pagebreak{} }}

    CMD_COPY_RAM_TO_FLASH (6)

    Programs Transfer RAM contents into Flash Memory.

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d6 1 CMD_COPY_RAM_TO_FLASH
    1 SectorID   1 SectorID 
    3...63       Not used
    In  Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d6 1  CMD_COPY_RAM_TO_FLASH
    1 Return Value   1  Return Value refer to return value table

    {{ simpsol.pagebreak{} }}

    CMD_CLEAR_RAM (7)

    Clears the complete TransferRAM (4kBytes total) by overwriting all bytes with 0xFF.

    Important: Note that you have to issue a CMD_CLEAR_RAM before being allowed to write to TransferRAM for security reasons! The number of valid data bytes in TransferRAM is set to 0x1000 by this command, so all data bytes can be read and overwritten afterwards.

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d7 1  CMD_CLEAR_RAM
    1...63        Not used

    {{ simpsol.pagebreak{} }}

    Onboard Port Commands

    CMD_ID_READ_PORTS (8)

    Reads states of internal digital ports.

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d8 1 CMD_ID_READ_PORTS
    1...63       Not used
    In  Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d 1  CMD_
    1 Return Value   1  

    {{ simpsol.pagebreak{} }}

    CMD_READ_ADC (10)

    Reads 8 bit representations of ADC values of the 6 internal ADCs. This will soon be replaced by a 16 bit version.

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d10 1 CMD_
    1...63       Not used
    In  Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d10 1 CMD_READ_ADC
    1 ADC port 0 (AIN 1) value   1  
    2 ADC port 1 (AIN 2) value   1  
    3 ADC port 2 (AIN 3) value   1  
    4 ADC port 3 (AIN 4) value   1  
    5 ADC port 4 (AIN 5) value   1  
    6 ADC port 5 (AIN 6) value   1  
    7...63       not used

    {{ simpsol.pagebreak{} }}

    ...

    Command Templates

    CMD_ (xxxxxxxxx)

    Description

    Out Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d 1 CMD_
    1 xx   1  
    3...63       Not used
    In  Report
    Address Content Value Length (Bytes) Remarks
    0 Command 0d 1  CMD_
    1 Return Value   1  

    {{ simpsol.pagebreak{} }}

     
    © Simple Solutions  •  Impressum  •  Wiki powered by Mindtouch