PDCP  1.0
Interface for Upper-Limb Prosthetics
Defines | Enumerations
MCP2515_TIMING

Macro defines for CNF1 (ocumentation p. 42) More...

Defines

#define CNF1_SJW_LENGTH   ((uint8_t)((1<<7)|(1<<6)))
 Synchronization Jump Width Length bits.
#define CNF1_SJW_SHIFT   ((uint8_t)(6))
#define CNF1_BRP_SET_BAUDRATE(number)   ((uint8_t)((number & 0x3F)))
 Baud Rate Prescaler bits.

Enumerations

enum  CNF_SJW_LENGTH { CNF1_LENGHT_1_TQ = 0, CNF1_LENGHT_2_TQ, CNF1_LENGHT_3_TQ, CNF1_LENGHT_4_TQ }
enum  CNF_BLTMODE { BLT_LENGTH_GREATER_OF_PS2_IPT = 0, BLT_LENGTH_DET_BY_PHSEG }
enum  CNF_SAM { SAM_SAMPLE_ONCE = 0, SAM_SAMPLE_3_TIMES }
#define CNF2_BLTMODE   ((uint8_t)(7))
 Macro defines for CNF2 (documentation p. 42)
#define CNF2_SAM   ((uint8_t)(6))
 Sample Point Configuration bit.
#define CNF2_PHSEG1_SHIFT   ((uint8_t)(3))
 PHSEG1.
#define CNF2_PHSEG1_MASK   ((uint8_t)((1<<5)|(1<<4)|(1<<3)))
#define CNF2_PRSEG_SHIFT   ((uint8_t)(0))
 PRSEG.
#define CNF2_PRSEG_MASK   ((uint8_t)((1<<2)|(1<<1)|(1<<0)))
enum  CNF2_START_OF_FRAME { CNF2_SOF_CLOCKOUT_FUNCTION = 0, CNF2_SOF_FOR_SOF_SIGNAL }
enum  CNF2_WAKEUP_FILTER { CNF2_WAKFIL_DISABLED = 0, CNF2_WAKFIL_ENABLED }
#define CNF2_SOF   ((uint8_t)(7))
 Macro defines for CNF3 (documentation p. 43)
#define CNF2_WAKFIL   ((uint8_t)(6))
 Wake-up Filter bit.
#define CNF2_PHSEG2_MASK   ((uint8_t)((1<<2)|(1<<1)|(1<<0)))
 PHSEG2.
#define CNF2_PHSEG2   ((uint8_t)(0))

Detailed Description

Macro defines for CNF1 (ocumentation p. 42)

Address: 2Ah

Author:
AZ

Define Documentation

#define CNF1_BRP_SET_BAUDRATE (   number)    ((uint8_t)((number & 0x3F)))

Baud Rate Prescaler bits.

R/W bit - bit is cleared, only 5:0 bits

Attention:
Tq = 2x(BRP+1)/Fosc
#define CNF1_SJW_LENGTH   ((uint8_t)((1<<7)|(1<<6)))

Synchronization Jump Width Length bits.

R/W bit - bit is cleared

Attention:
11 - Length = 4xTq 10 - Length = 3xTq 01 - Length = 2xTq 00 - Length = 1xTq
#define CNF2_BLTMODE   ((uint8_t)(7))

Macro defines for CNF2 (documentation p. 42)

Address: 29h

Author:
AZPS2 Bit Time Length bit

R/W bit - bit is cleared

Attention:
1 - Length of PS2 determined by PHSEG22:PHSEG20 bits of CNF3 0 - Length of PS2 is greater of PS1 and IPT (2 TQ)
#define CNF2_PHSEG1_SHIFT   ((uint8_t)(3))

PHSEG1.

R/W bit - bit is cleared

Attention:
( PHSEG1 + 1 ) x Tq, only 5-3 bits
#define CNF2_PHSEG2_MASK   ((uint8_t)((1<<2)|(1<<1)|(1<<0)))

PHSEG2.

R/W bit - bit is cleared ( PHSEG1 + 1 ) x Tq, only 5-3 bits

#define CNF2_PRSEG_SHIFT   ((uint8_t)(0))

PRSEG.

R/W bit - bit is cleared

Attention:
( PHSEG1 + 1 ) x Tq, only 2-0 bits
#define CNF2_SAM   ((uint8_t)(6))

Sample Point Configuration bit.

R/W bit - bit is cleared

Attention:
1 - Bus line is sampled 3x at the sample point 0 - Bus line is sampled once at the sample point
#define CNF2_SOF   ((uint8_t)(7))

Macro defines for CNF3 (documentation p. 43)

Address: 28h

Author:
AZSOF

Start-of-Frame R/W bit - bit is cleared 1 - CLKOUT pin enabled for SOF signal 0 - CLKOUT pin enabled for clockout function

Attention:
If CANCTRL.CLKEN = 0, Bit is don't care
#define CNF2_WAKFIL   ((uint8_t)(6))

Wake-up Filter bit.

R/W bit - bit is cleared 1 - Wake-up filter enabled 0 - Wake-up filter disabled


Enumeration Type Documentation

Enumerator:
CNF2_SOF_CLOCKOUT_FUNCTION 

CLKOUT pin enabled for clockout function

CNF2_SOF_FOR_SOF_SIGNAL 

CLKOUT pin enabled for SOF signal

Enumerator:
CNF2_WAKFIL_DISABLED 

Wake-up filter disabled

CNF2_WAKFIL_ENABLED 

Wake-up filter enabled

Enumerator:
BLT_LENGTH_GREATER_OF_PS2_IPT 

Length of PS2 is greater of PS1 and IPT (2 TQ)

BLT_LENGTH_DET_BY_PHSEG 

Length of PS2 determined by PHSEG22:PHSEG20 bits of CNF3

enum CNF_SAM
Enumerator:
SAM_SAMPLE_ONCE 

Bus line is sampled once at the sample point

SAM_SAMPLE_3_TIMES 

Bus line is sampled 3x at the sample point

Enumerator:
CNF1_LENGHT_1_TQ 

00 - Length = 1xTq

CNF1_LENGHT_2_TQ 

01 - Length = 2xTq

CNF1_LENGHT_3_TQ 

10 - Length = 3xTq

CNF1_LENGHT_4_TQ 

11 - Length = 4xTq

 All Classes Files Variables Enumerations Enumerator Defines