PER Firmware
Loading...
Searching...
No Matches
fdcan_priv.h
1
2#ifndef __PHAL_G4_FDCAN_PRIV_H__
3#define __PHAL_G4_FDCAN_PRIV_H__
4
5#define RCC_FDCANCLKSOURCE_HSE 0x00000000U
6#define RCC_FDCANCLKSOURCE_PLL RCC_CCIPR_FDCANSEL_0
7#define RCC_FDCANCLKSOURCE_PCLK1 RCC_CCIPR_FDCANSEL_1
8
9#define FDCAN_ACCEPT_IN_RX_FIFO0 ((uint32_t)0x00000000U)
10#define FDCAN_ACCEPT_IN_RX_FIFO1 ((uint32_t)0x00000001U)
11#define FDCAN_REJECT ((uint32_t)0x00000002U)
13#define SRAMCAN_FLS_NBR (28U) /* Max. Filter List Standard Number */
14#define SRAMCAN_FLE_NBR (8U) /* Max. Filter List Extended Number */
15#define SRAMCAN_RF0_NBR (3U) /* RX FIFO 0 Elements Number */
16#define SRAMCAN_RF1_NBR (3U) /* RX FIFO 1 Elements Number */
17#define SRAMCAN_TEF_NBR (3U) /* TX Event FIFO Elements Number */
18#define SRAMCAN_TFQ_NBR (3U) /* TX FIFO/Queue Elements Number */
19
20#define SRAMCAN_FLS_SIZE (1U * 4U) /* Filter Standard Element Size in bytes */
21#define SRAMCAN_FLE_SIZE (2U * 4U) /* Filter Extended Element Size in bytes */
22#define SRAMCAN_RF0_SIZE (18U * 4U) /* RX FIFO 0 Elements Size in bytes */
23#define SRAMCAN_RF1_SIZE (18U * 4U) /* RX FIFO 1 Elements Size in bytes */
24#define SRAMCAN_TEF_SIZE (2U * 4U) /* TX Event FIFO Elements Size in bytes */
25#define SRAMCAN_TFQ_SIZE (18U * 4U) /* TX FIFO/Queue Elements Size in bytes */
26
27#define SRAMCAN_FLSSA ((uint32_t)0) /* Filter List Standard Start
28 Address */
29#define SRAMCAN_FLESA ((uint32_t)(SRAMCAN_FLSSA + (SRAMCAN_FLS_NBR * SRAMCAN_FLS_SIZE))) /* Filter List Extended Start
30 Address */
31#define SRAMCAN_RF0SA ((uint32_t)(SRAMCAN_FLESA + (SRAMCAN_FLE_NBR * SRAMCAN_FLE_SIZE))) /* Rx FIFO 0 Start Address */
32#define SRAMCAN_RF1SA ((uint32_t)(SRAMCAN_RF0SA + (SRAMCAN_RF0_NBR * SRAMCAN_RF0_SIZE))) /* Rx FIFO 1 Start Address */
33#define SRAMCAN_TEFSA ((uint32_t)(SRAMCAN_RF1SA + (SRAMCAN_RF1_NBR * SRAMCAN_RF1_SIZE))) /* Tx Event FIFO Start
34 Address */
35#define SRAMCAN_TFQSA ((uint32_t)(SRAMCAN_TEFSA + (SRAMCAN_TEF_NBR * SRAMCAN_TEF_SIZE))) /* Tx FIFO/Queue Start
36 Address */
37#define SRAMCAN_SIZE ((uint32_t)(SRAMCAN_TFQSA + (SRAMCAN_TFQ_NBR * SRAMCAN_TFQ_SIZE))) /* Message RAM size */
38
39#endif // __PHAL_G4_FDCAN_PRIV_H__