aeszym
(A Szym)
November 17, 2020, 2:37am
1
I’d like to use the CRC calculation HW on this board - but I’m using the mbed-cli. When I compile the source from mbed-os/hal/tests/TESTS/mbed_hal/crc/main.cpp, I get a message like:
25 | #error [NOT_SUPPORTED] CRC not supported for this target
but I am reasonably sure this version does have the CRC HW. In the mbed-os directory, I see files like:
targets/TARGET_STM/TARGET_STM32F4//STM32Cube_FW/STM32F4xx_HAL_Driver/stm32f4xx_hal_crc.c
but I note that that path contains “STM32Cube”, and I would prefer not to run the IDE version.
Any one know how I can proceed?
Thanks,
Andy S.
JohnnyK
(Jan Kamidra)
November 22, 2020, 12:18pm
2
Hello,
Yes, this board has the hardware CRC but it seems it is not enabled/implemented for the STM32F4xx series under Mbed.
In the targets.json file I found the CRC only for these series F0, F3, F7, H7, L0, L4, L5 and WB.
BR, Jan
JojoS
(Johannes Stratmann)
November 22, 2020, 1:06pm
3
The CRC hardware is different for older and newer MCU series, and for F4 the implementation has to be changed:
opened 03:07PM - 26 Jul 18 UTC
closed 04:57PM - 31 Oct 19 UTC
devices: st
### Description
Since STM32F4 and F1 have CRC engine it would be nice to suppor… t it mbedOS. I can see that there is already support for L0,L4,F0,F3,F7 it would be nice to have them all covered
<!--
Required
Add detailed description of what you are reporting.
Good example: https://os.mbed.com/docs/latest/reference/workflow.html
Things to consider sharing:
- What target does this relate to?
- What toolchain (name + version) are you using?
- What tools (name + version - is it mbed-cli, online compiler or IDE) are you using?
- What is the SHA of Mbed OS (git log -n1 --oneline)?
- Steps to reproduce. (Did you publish code or a test case that exhibits the problem?)
-->
### Issue request type
<!--
Required
Please add only one X to one of the following types. Do not fill multiple types. (Split the issue otherwise.)
Please note this is not a GitHub task list; indenting the boxes or changing the format to add a '.' or '*' in front
of them changes the meaning incorrectly. The only changes to make are to add a description under the
description heading and to add an 'x' to the correct box.
[X] Question
[X] Enhancement
[ ] Bug
-->
[ ] Question
[X] Enhancement
[ ] Bug
in the comment you can see also the different features:
/* STM32 CRC preipheral features
+-------------------------+-----------------------+---------------+---------------+
| Feature | F1/L1/F2/F4 series | F0 series (#1)| L0/F3/L4/F7 |
+-========================+=======================+===============+===============+
| Reversibility option | NO | YES |
| on I/O data | | |
+-------------------------+-----------------------+---------------+---------------+
| CRC initial Value | Fixed to 0xFFFFFFFF | Programmable |
+-------------------------+-----------------------+---------------+---------------+
| Handled data size in bit| 32 | 8,16,32 |
+-------------------------+---------------------------------------+---------------+
| Polynomial size in bit | 32 | Fixed/Prog(#1)| 7,8,16,32 |
+-------------------------+---------------------------------------+---------------+
| Polynomial coefficients | Fixed to 0x4C11DB7 | Fixed/Prog(#1)| Programmable |
+-------------------------+---------------------------------------+---------------+
#1 The STM32F0 series which supported polynomial in 7, 8, 16, 32 bits as below list:
STM32F071xB
STM32F072xB
STM32F078xx
This file has been truncated. show original