Skip to content

fix(BLE): Updated MAX32665 libphy and fixed sys_me14 #1060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Libraries/BlePhy/MAX32665/libphy.a
Binary file not shown.
Binary file modified Libraries/BlePhy/MAX32665/libphy_hard.a
Binary file not shown.
4 changes: 3 additions & 1 deletion Libraries/PeriphDrivers/Source/SYS/sys_me14.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ int MXC_SYS_GetUSN(uint8_t *usn, uint8_t *checksum)

// Compute the checksum
if (checksum != NULL) {
uint8_t usn_copy[MXC_SYS_USN_CHECKSUM_LEN] = { 0 };
uint8_t check_csum[MXC_SYS_USN_CHECKSUM_LEN];
uint8_t key[MXC_SYS_USN_CHECKSUM_LEN];

memcpy(usn_copy, usn, MXC_SYS_USN_LEN);
/* Initialize the remainder of the USN and key */
memset(key, 0, MXC_SYS_USN_CHECKSUM_LEN);
memset(checksum, 0, MXC_SYS_USN_CSUM_FIELD_LEN);
Expand All @@ -94,7 +96,7 @@ int MXC_SYS_GetUSN(uint8_t *usn, uint8_t *checksum)
checksum[0] = ((infoblock[4] & 0x007F8000) >> 15);

MXC_TPU_Cipher_Config(MXC_TPU_MODE_ECB, MXC_TPU_CIPHER_AES128);
MXC_TPU_Cipher_AES_Encrypt((const char *)usn, NULL, (const char *)key,
MXC_TPU_Cipher_AES_Encrypt((const char *)usn_copy, NULL, (const char *)key,
MXC_TPU_CIPHER_AES128, MXC_TPU_MODE_ECB, MXC_AES_DATA_LEN,
(char *)check_csum);

Expand Down
Loading