NVM_request_t Struct Reference

yasimavr: NVM_request_t Struct Reference
yasimavr
Loading...
Searching...
No Matches

Structure used for AVR_CTLREQ_NVM_REQUEST requests. More...

#include <sim_peripheral.h>

Public Attributes

unsigned char kind
 Kind of request : 0:write (SPM), 1:read (LPM)
 
int nvm
 Memory block being written/read : -1 if unknown/irrelevant, otherwise one of AVR_NVM enumeration values.
 
mem_addr_t addr
 Address to write/read (in the appropriate block address space)
 
uint16_t data
 Value [to write to/read from] the NVM.
 
signed char result
 Result of the request : >0:success, 0:ignored, <0:error/refused.
 
unsigned short cycles
 Number of cycles to be consumed, only for write (SPM) requests and if result>=0.
 

Detailed Description

Structure used for AVR_CTLREQ_NVM_REQUEST requests.

These structure are used when :

  • a SPM instruction is executed, or
  • flash memory is read and direct mode is disabled.

These requests are processed by the NVM controller (if it exists) and returned with the result field set. This system allows to implement access control measures and self-programming features.

Member Data Documentation

◆ addr

mem_addr_t NVM_request_t::addr

Address to write/read (in the appropriate block address space)

◆ cycles

unsigned short NVM_request_t::cycles

Number of cycles to be consumed, only for write (SPM) requests and if result>=0.

◆ data

uint16_t NVM_request_t::data

Value [to write to/read from] the NVM.

◆ kind

unsigned char NVM_request_t::kind

Kind of request : 0:write (SPM), 1:read (LPM)

◆ nvm

int NVM_request_t::nvm

Memory block being written/read : -1 if unknown/irrelevant, otherwise one of AVR_NVM enumeration values.

◆ result

signed char NVM_request_t::result

Result of the request : >0:success, 0:ignored, <0:error/refused.


The documentation for this struct was generated from the following file: