@@ -10,21 +10,21 @@ static uint32_t final_xor;
10
10
static uint32_t crc_mask ;
11
11
12
12
/* STM32 CRC preipheral features
13
- +-------------------------+-----------------------+---------------+ ---------------+
14
- | Feature | F1/L1/F2/F4 series | F0 series | L0/F3/L4/F7 |
15
- +-========================+=======================+===============+ ===============+
13
+ +-------------------------+-----------------------+---------------- ---------------+
14
+ | Feature | F1/L1/F2/F4 series | F0/ L0/F3/L4/F7/H7 or newer |
15
+ +-========================+=======================+================ ===============+
16
16
| Reversibility option | NO | YES |
17
17
| on I/O data | | |
18
- +-------------------------+-----------------------+---------------+ ---------------+
19
- | CRC initial Value | Fixed to 0xFFFFFFFF | Programmable | Programmable |
20
- | | | on 32 bits | on 8,16,32 |
21
- +-------------------------+-----------------------+---------------+ ---------------+
22
- | Handled data size in bit| 32 | 8,16,32 |
23
- +-------------------------+---------------------------------------+ ---------------+
24
- | Polynomial size in bit | 32 | 7,8, 16,32 |
25
- +-------------------------+---------------------------------------+ ---------------+
26
- | Polynomial coefficients | Fixed to 0x4C11DB7 | Programmable |
27
- +-------------------------+---------------------------------------+ ---------------+
18
+ +-------------------------+-----------------------+---------------- ---------------+
19
+ | CRC initial Value | Fixed to 0xFFFFFFFF | Programmable on 8, 16, 32 |
20
+ | | | bits |
21
+ +-------------------------+-----------------------+---------------- ---------------+
22
+ | Handled data size in bit| 32 | 8, 16, 32 |
23
+ +-------------------------+-----------------------+ -------------------------------+
24
+ | Polynomial size in bit | 32 | 7, 8, 16, 32 |
25
+ +-------------------------+-----------------------+ -------------------------------+
26
+ | Polynomial coefficients | Fixed to 0x4C11DB7 | Programmable |
27
+ +-------------------------+-----------------------+ -------------------------------+
28
28
*/
29
29
bool hal_crc_is_supported (const crc_mbed_config_t * config )
30
30
{
@@ -33,22 +33,15 @@ bool hal_crc_is_supported(const crc_mbed_config_t *config)
33
33
}
34
34
35
35
#if defined(TARGET_STM32F1 ) || defined(TARGET_STM32F2 ) || defined(TARGET_STM32F4 ) || defined(TARGET_STM32L1 )
36
- if (config -> width != 32 || config -> polynomial != POLY_32BIT_ANSI ||
37
- config -> initial_xor != 0xFFFFFFFF || config -> reflect_in || config -> reflect_out ) {
38
- return false;
39
- }
40
- #elif defined(TARGET_STM32F0 )
41
- if (config -> width != 32 || config -> polynomial != POLY_32BIT_ANSI ) {
42
- return false;
43
- }
36
+ /* Currently, mbed supported input data format fix on bytes,
37
+ so those devices are not supported at default. */
38
+ return false;
44
39
#else
45
- /* Fully function support on L0, F3, L4, F7, H7 and newer series */
46
40
if (config -> width != 32 && config -> width != 16 && config -> width != 8 && config -> width != 7 ) {
47
41
return false;
48
42
}
49
- #endif
50
-
51
43
return true;
44
+ #endif
52
45
}
53
46
54
47
static uint32_t get_crc_mask (int width )
0 commit comments