ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_crc_regs.h
Go to the documentation of this file.
1
30
31#pragma once
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37#include <stdint.h>
38
43typedef enum : uintptr_t {
44 k_ra8_crc_base_addr = 0x40310000UL,
46
62
69typedef enum : uint8_t {
73
84typedef struct {
85 volatile uint8_t CRCCR0;
86 volatile uint8_t CRCCR1;
87 volatile uint16_t _r0;
88 union {
89 volatile uint32_t CRCDIR;
90 volatile uint8_t CRCDIR_BY;
91 };
92 union {
93 volatile uint32_t CRCDOR;
94 volatile uint16_t CRCDOR_HA;
95 volatile uint8_t CRCDOR_BY;
96 };
97 volatile uint16_t CRCSAR;
98 volatile uint16_t _r1;
100
105static inline volatile r_crc_regs_t* ra8_crc(void)
106{
107 return (volatile r_crc_regs_t*)k_ra8_crc_base_addr;
108}
109
110#ifdef __cplusplus
111}
112#endif
ra8_crc_bit_order_t
Bit-order for CRC calculation, written to CRCCR0.LMS (bit 6).
@ k_ra8_crc_lsb_first
LMS=0 LSB-first communication.
@ k_ra8_crc_msb_first
LMS=1 MSB-first communication.
ra8_crc_poly_t
Polynomial selection values written to CRCCR0.GPS[2:0].
@ k_ra8_crc_poly_32_ieee802_3
GPS=100 CRC-32 (IEEE 802.3).
@ k_ra8_crc_poly_16_ccitt
GPS=011 CRC-CCITT (X^16+X^12+X^5+1).
@ k_ra8_crc_poly_none
GPS=000 No calculation.
@ k_ra8_crc_poly_32c_rev
GPS=101 CRC-32C (Castagnoli, reflected).
@ k_ra8_crc_poly_16
GPS=010 CRC-16 (X^16+X^15+X^2+1).
@ k_ra8_crc_poly_8
GPS=001 CRC-8 (X^8+X^2+X+1).
ra8_crc_addr_t
CRC peripheral base address.
@ k_ra8_crc_base_addr
HUM Ch 48 p 3180 "CRC base".
static volatile r_crc_regs_t * ra8_crc(void)
Get pointer to the CRC peripheral register block.
CRC peripheral register block.
volatile uint32_t CRCDOR
+0x08 Output Data (32-bit, CRC-32/32C).
volatile uint8_t CRCCR0
+0x00 Control Register 0 (GPS/LMS/DORCLR).
volatile uint8_t CRCDIR_BY
+0x04 Input Data (8-bit alias).
volatile uint16_t _r0
+0x02 Reserved.
volatile uint16_t CRCSAR
+0x0C Snoop Address Register (14-bit).
volatile uint32_t CRCDIR
+0x04 Input Data (32-bit, CRC-32/32C).
volatile uint8_t CRCDOR_BY
+0x08 Output Data (8-bit alias).
volatile uint16_t _r1
+0x0E Reserved.
volatile uint8_t CRCCR1
+0x01 Control Register 1 (CRCSWR/CRCSEN).
volatile uint16_t CRCDOR_HA
+0x08 Output Data (16-bit alias).