File syn_ccp.h¶
Go to the source code of this file
ASAM CAN Calibration Protocol v2.1 (CCP) Slave Implementation. More...
#include <stdbool.h>#include <stddef.h>#include <stdint.h>
Classes¶
| Type | Name |
|---|---|
| struct | SYN_CCP_DAQList DAQ List structure. |
| struct | SYN_CCP_ODT ODT (Object Descriptor Table) structure. |
| struct | SYN_CCP_ODTEntry ODT Element mapping entry. |
| struct | SYN_CCP_Slave CCP Slave Instance Handle. |
Public Types¶
| Type | Name |
|---|---|
| typedef bool(* | SYN_CCP_EraseFn CCP Memory Erase callback. |
| typedef uint32_t(* | SYN_CCP_SeedFn CCP Security Seed Generator callback. |
| typedef bool(* | SYN_CCP_UnlockFn CCP Security Unlock Key verification callback. |
Public Functions¶
| Type | Name |
|---|---|
| void | syn_ccp_init (SYN_CCP_Slave * slave, uint16_t station_addr) Initialize CCP slave instance. |
| bool | syn_ccp_process_cro (SYN_CCP_Slave * slave, const uint8_t cro, uint8_t dto_out) Process incoming Command Receive Object (CRO) frame. |
| bool | syn_ccp_service_daq (SYN_CCP_Slave * slave, uint8_t event_channel, uint8_t dto_out, uint8_t * list_idx, uint8_t * odt_idx) Service periodic DAQ sampling tick. |
| void | syn_ccp_set_mta (SYN_CCP_Slave * slave, uint8_t mta_num, uint8_t ext, uintptr_t addr) Set Memory Transfer Address (MTA0 or MTA1). |
Macros¶
Detailed Description¶
Provides a lightweight, zero-allocation CCP v2.1 slave protocol stack for ECU calibration, live parameter tuning, memory upload/download, and DAQ (Data Acquisition) list streaming over CAN 2.0B.
Public Types Documentation¶
typedef SYN_CCP_EraseFn¶
CCP Memory Erase callback.
typedef SYN_CCP_SeedFn¶
CCP Security Seed Generator callback.
typedef SYN_CCP_UnlockFn¶
CCP Security Unlock Key verification callback.
Public Functions Documentation¶
function syn_ccp_init¶
Initialize CCP slave instance.
Parameters:
slavePointer to CCP slave handle.station_addr16-bit CCP station address.
function syn_ccp_process_cro¶
Process incoming Command Receive Object (CRO) frame.
Parameters:
slavePointer to CCP slave handle.cro8-byte CRO input CAN payload.dto_out8-byte buffer to receive Command Return Message (DTO/CRM).
Returns:
True if DTO response frame is ready to transmit.
function syn_ccp_service_daq¶
Service periodic DAQ sampling tick.
bool syn_ccp_service_daq (
SYN_CCP_Slave * slave,
uint8_t event_channel,
uint8_t dto_out,
uint8_t * list_idx,
uint8_t * odt_idx
)
Parameters:
slavePointer to CCP slave handle.event_channelTrigger event channel index.dto_outOutput buffer for DAQ DTO packet.list_idxOutput index of transmitting DAQ list.odt_idxOutput index of transmitting ODT.
Returns:
True if a DAQ packet is ready to send.
function syn_ccp_set_mta¶
Set Memory Transfer Address (MTA0 or MTA1).
Parameters:
slavePointer to CCP slave handle.mta_num0 for MTA0, 1 for MTA1.extAddress extension.addrTarget memory address.
Macro Definition Documentation¶
define SYN_CCP_CMD_BUILD_PKT¶
Build DAQ packet
define SYN_CCP_CMD_CLEAR_MEMORY¶
Clear flash/RAM memory
define SYN_CCP_CMD_CONNECT¶
Establish connection
define SYN_CCP_CMD_DISCONNECT¶
Disconnect station
define SYN_CCP_CMD_DNLOAD¶
Download data block
define SYN_CCP_CMD_DNLOAD_6¶
Fast 6-byte download
define SYN_CCP_CMD_EXCHANGE_ID¶
Exchange station ID
define SYN_CCP_CMD_GET_ACTIVE_CAL_PAGE¶
Get active calibration page
define SYN_CCP_CMD_GET_CCP_VERSION¶
Get CCP protocol version
define SYN_CCP_CMD_GET_DAQ_SIZE¶
Get DAQ list size
define SYN_CCP_CMD_GET_SEED¶
Get seed for security unlock
define SYN_CCP_CMD_PROGRAM¶
Program flash memory
define SYN_CCP_CMD_SET_CAL_PAGE¶
Set calibration page
define SYN_CCP_CMD_SET_DAQ_SIZE¶
Set DAQ list size
define SYN_CCP_CMD_SET_MTA¶
Set memory transfer address
define SYN_CCP_CMD_SHORT_UP¶
Short upload
define SYN_CCP_CMD_START_STOP¶
Start/stop single DAQ list
define SYN_CCP_CMD_START_STOP_ALL¶
Start/stop all DAQ lists
define SYN_CCP_CMD_UNLOCK¶
Send key to unlock resource
define SYN_CCP_CMD_UPLOAD¶
Upload data block
define SYN_CCP_ERR_ACCESS_DENIED¶
Access denied
define SYN_CCP_ERR_CMD_SYNTAX¶
Command syntax error
define SYN_CCP_ERR_CMD_UNKNOWN¶
Command unknown
define SYN_CCP_ERR_NOT_CONNECTED¶
Station not connected
define SYN_CCP_ERR_PARAM_OUT_OF_RANGE¶
Parameter out of range
define SYN_CCP_ERR_RESOURCE_LOCKED¶
Resource locked
define SYN_CCP_ERR_SUCCESS¶
Action succeeded
define SYN_CCP_MAX_DAQ_LISTS¶
Maximum number of DAQ lists per CCP node.
define SYN_CCP_MAX_ENTRIES_PER_ODT¶
Maximum entries per ODT.
define SYN_CCP_MAX_ODT_PER_DAQ¶
Maximum ODTs per DAQ list.
define SYN_CCP_PID_CRM¶
Command response message
define SYN_CCP_PID_EVENT¶
Event packet
define SYN_CCP_RESOURCE_CAL¶
Calibration resource mask
define SYN_CCP_RESOURCE_DAQ¶
Data acquisition resource mask
define SYN_CCP_RESOURCE_PGM¶
Flash programming resource mask
The documentation for this class was generated from the following file src/syntropic/proto/syn_ccp.h