@@ -1021,6 +1021,10 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
1021
1021
1022
1022
default :
1023
1023
hcryp -> ErrorCode |= HAL_CRYP_ERROR_NOT_SUPPORTED ;
1024
+
1025
+ /* Process unlocked */
1026
+ __HAL_UNLOCK (hcryp ); // MBED patch
1027
+
1024
1028
return HAL_ERROR ;
1025
1029
}
1026
1030
@@ -1057,6 +1061,10 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
1057
1061
1058
1062
default :
1059
1063
hcryp -> ErrorCode |= HAL_CRYP_ERROR_NOT_SUPPORTED ;
1064
+
1065
+ /* Process unlocked */
1066
+ __HAL_UNLOCK (hcryp ); // MBED patch
1067
+
1060
1068
return HAL_ERROR ;
1061
1069
}
1062
1070
#endif /*end AES or CRYP */
@@ -1065,10 +1073,10 @@ HAL_StatusTypeDef HAL_CRYP_Encrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
1065
1073
{
1066
1074
/* Change the CRYP peripheral state */
1067
1075
hcryp -> State = HAL_CRYP_STATE_READY ;
1068
-
1076
+ }
1077
+
1069
1078
/* Process unlocked */
1070
- __HAL_UNLOCK (hcryp );
1071
- }
1079
+ __HAL_UNLOCK (hcryp ); // MBED patch
1072
1080
}
1073
1081
else
1074
1082
{
@@ -1186,6 +1194,10 @@ HAL_StatusTypeDef HAL_CRYP_Decrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
1186
1194
1187
1195
default :
1188
1196
hcryp -> ErrorCode |= HAL_CRYP_ERROR_NOT_SUPPORTED ;
1197
+
1198
+ /* Process unlocked */
1199
+ __HAL_UNLOCK (hcryp ); // MBED patch
1200
+
1189
1201
return HAL_ERROR ;
1190
1202
}
1191
1203
@@ -1230,10 +1242,10 @@ HAL_StatusTypeDef HAL_CRYP_Decrypt(CRYP_HandleTypeDef *hcryp, uint32_t *Input, u
1230
1242
{
1231
1243
/* Change the CRYP peripheral state */
1232
1244
hcryp -> State = HAL_CRYP_STATE_READY ;
1233
-
1234
- /* Process unlocked */
1235
- __HAL_UNLOCK (hcryp );
1236
1245
}
1246
+
1247
+ /* Process unlocked */
1248
+ __HAL_UNLOCK (hcryp ); // MBED patch
1237
1249
}
1238
1250
else
1239
1251
{
0 commit comments