trapulsPac - User Guide
Chapter 3 – Reference
Block process
Index 0x5F32
Name Block process
Object Code RECORD
Number of Elements 5
Value Description
Sub Index 1
Description Block_Type
Data Type Unsigned16
Access rw
Value defines the Block_Type of data bock
Sub Index 2
Description buffer_Size (read-only)
Data Type Unsigned32
Access ro
Value gives the buffer size (bytes) for current block (depends on block_type)
Sub Index 3
Description Current_sector (read-only)
Data Type Unsigned32
Access ro
Value
Sub Index 4
Description Current_address (read-only)
Data Type Unsigned32
Access ro
Value
Sub Index 5
Description Buffer (segmented)
Data Type Unsigned32
Access rw
Value transfer data to/from buffer:
binary_block (block_header + block_data)
Programming sequence
Initialization:
Update Code: write 0x5F30,1 = update_code
Change to program mode: write 0x5F30,2 = 1
Verify program mode: read 0x5F30,2 = 1
Erase:
Number of Blocks: write 0x5F31,1 = n_blocks
Number of Block_type: write 0x5F31,2 = n_types
Sectors Mask: write 0x5F31,3 = sectors_mask
Erase command: write 0x5F31,4 = 1
Verify erase command: read 0x5F31,4 = 0
Programming:
repeat (n blocks)
Write Block_type: write 0x5F32,1 = block_type
Write Block (header & data): write seg 0x5F32,5
Program Block command: write 0x5F32,6 = 1
Verify program command: read 0x5F32,6 = 0