aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F0xx/crc/readme.txt
blob: b10413a0669e4f76a1e65d350f5d40ee6adc254e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
*****************************************************************************
** ChibiOS/HAL - CRC driver demo for STM32F0xx (also sw driver)            **
*****************************************************************************

** TARGET **

The demo runs on an ST STM32F0-Discovery board.

** The Demo **

The application demonstrates the use of the STM32F0xx CRC driver.  There are
many different ways to configure and setup the CRC.  This demo has be
configured to test the following:
  * ST hardware block configured with CRC32 with or without DMA
  * ST hardware block configured with CRC16 with or without DMA
  * Software CRC32
  * Software CRC16

** Board Setup **

- No requirements

** Build Procedure **

The demo has been tested using the free Codesourcery GCC-based toolchain
and YAGARTO.
Just modify the TRGT line in the makefile in order to use different GCC ports.

** Notes **

Some files used by the demo are not part of ChibiOS/RT but are copyright of
ST Microelectronics and are licensed under a different license.
Also note that not all the files present in the ST library are distributed
with ChibiOS/RT, you can find the whole library on the ST web site:

                             http://www.st.com
/span>(int fd, uint64_t *size) { int rc; struct disklabel dl; *size = 0; rc = ioctl(fd, DIOCGDINFO, &dl); if (rc) { DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image"); return -EINVAL; } *size = dl.d_secsize * dl.d_secpercyl; return 0; } int blk_getsectorsize(int fd, uint64_t *sector_size) { int rc; struct disklabel dl; *sector_size = DEV_BSIZE; rc = ioctl(fd, DIOCGDINFO, &dl); if (rc) { DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image"); return 0; /* fallback to DEV_BSIZE */ } *sector_size = dl.d_secsize; return 0; }