Télécharger Imprimer la page

ez-wheel SWD Notice D'instruction page 113

Publicité

11.8. Signatures
Les configurations de sécurité incluent une signature de type CRC visant à garantir leur intégrité. Une erreur de
signature empêche le passage dans l'état NMT opérationnel.
En cas d'erreur sur la signature d'une des fonctions de sécurité l'objet '6607 00
valid' prend la valeur 00
Operational.
Idx
Sub
Name
Safety application
6607
0
configuration
h
valid
Value
Definition
00
Safety configuration invalid
h
A5
Safety configuration valid
h
Méthode de calcul
Le calcul des CRC des groupes de données de sécurité est effectué avec le polynôme de génération CRC-16-
16
12
5
CCITT : G(x) = x
+x
+x
+1
Exemple d'implémentation :
UNSIGNED16
crc = 0u;
Pour chaque octet faire :
crc = CrcCalc(crc, octet);
Exemple de fonction de calcul de CRC ; CrcCalc() :
UNSIGNED16 CrcCalc(
UNSIGNED16
UNSIGNED8
)
{
static const UNSIGNED16 crc_tabccitt[256] = {
0x0000u, 0x1021u, 0x2042u, 0x3063u, 0x4084u, 0x50a5u, 0x60c6u, 0x70e7u,
0x8108u, 0x9129u, 0xa14au, 0xb16bu, 0xc18cu, 0xd1adu, 0xe1ceu, 0xf1efu,
0x1231u, 0x0210u, 0x3273u, 0x2252u, 0x52b5u, 0x4294u, 0x72f7u, 0x62d6u,
0x9339u, 0x8318u, 0xb37bu, 0xa35au, 0xd3bdu, 0xc39cu, 0xf3ffu, 0xe3deu,
0x2462u, 0x3443u, 0x0420u, 0x1401u, 0x64e6u, 0x74c7u, 0x44a4u, 0x5485u,
0xa56au, 0xb54bu, 0x8528u, 0x9509u, 0xe5eeu, 0xf5cfu, 0xc5acu, 0xd58du,
0x3653u, 0x2672u, 0x1611u, 0x0630u, 0x76d7u, 0x66f6u, 0x5695u, 0x46b4u,
0xb75bu, 0xa77au, 0x9719u, 0x8738u, 0xf7dfu, 0xe7feu, 0xd79du, 0xc7bcu,
0x48c4u, 0x58e5u, 0x6886u, 0x78a7u, 0x0840u, 0x1861u, 0x2802u, 0x3823u,
0xc9ccu, 0xd9edu, 0xe98eu, 0xf9afu, 0x8948u, 0x9969u, 0xa90au, 0xb92bu,
0x5af5u, 0x4ad4u, 0x7ab7u, 0x6a96u, 0x1a71u, 0x0a50u, 0x3a33u, 0x2a12u,
0xdbfdu, 0xcbdcu, 0xfbbfu, 0xeb9eu, 0x9b79u, 0x8b58u, 0xbb3bu, 0xab1au,
0x6ca6u, 0x7c87u, 0x4ce4u, 0x5cc5u, 0x2c22u, 0x3c03u, 0x0c60u, 0x1c41u,
0xedaeu, 0xfd8fu, 0xcdecu, 0xddcdu, 0xad2au, 0xbd0bu, 0x8d68u, 0x9d49u,
0x7e97u, 0x6eb6u, 0x5ed5u, 0x4ef4u, 0x3e13u, 0x2e32u, 0x1e51u, 0x0e70u,
0xff9fu, 0xefbeu, 0xdfddu, 0xcffcu, 0xbf1bu, 0xaf3au, 0x9f59u, 0x8f78u,
0x9188u, 0x81a9u, 0xb1cau, 0xa1ebu, 0xd10cu, 0xc12du, 0xf14eu, 0xe16fu,
0x1080u, 0x00a1u, 0x30c2u, 0x20e3u, 0x5004u, 0x4025u, 0x7046u, 0x6067u,
Version 2.0.2_FR – 31/10/2023 - SWD®
, sinon il vaut A5
Les signatures doivent être mises à jour en mode NMT Pre-
h
h.
Data
Default
Access
Type
Value
Type
U8
-
RW
crc,
value
PDO
Lower
Unit
Mapping
Limit
NO
-
0
/* start value for CRC
/* pointer to data for CRC */
NOTICE D'INSTRUCTION
Safety application configuration
h
Upper
Size in
Non-volatile
Limit
Bytes
storage
255
1
*/
Page 113 sur 132
SWD®
Yes

Publicité

loading