Skip to content
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

fix(PeriphDrivers): Fix MAA Operator Setter for TPU Drivers #1104

Merged
merged 6 commits into from
Aug 8, 2024
Merged
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
4 changes: 3 additions & 1 deletion Libraries/PeriphDrivers/Source/TPU/tpu_reva.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ int MXC_TPU_RevA_Cipher_Config(mxc_tpu_reva_regs_t *tpu, mxc_tpu_reva_modesel_t
int MXC_TPU_RevA_Cipher_KeySelect(mxc_tpu_reva_regs_t *tpu, mxc_tpu_reva_keysrc_t key_src)
{
MXC_SETFIELD(tpu->cipher_ctrl, MXC_F_TPU_REVA_CIPHER_CTRL_SRC, key_src);
// Note: "key_src" enum is set with "S" definitions instead of "V" definitions, so shifting is not necessary

return E_SUCCESS;
}
Expand Down Expand Up @@ -716,7 +717,8 @@ int MXC_TPU_RevA_MAA_Compute(mxc_tpu_reva_regs_t *tpu, mxc_tpu_maa_clcsel_t clc,
memcpy((void *)MAA_M, (uint32_t *)mod, len);

// Start MAA
MXC_SETFIELD(tpu->maa_ctrl, MXC_F_TPU_REVA_MAA_CTRL_CLC, clc);
MXC_SETFIELD(tpu->maa_ctrl, MXC_F_TPU_REVA_MAA_CTRL_CLC,
clc << MXC_F_TPU_REVA_MAA_CTRL_CLC_POS);
tpu->maa_ctrl |= MXC_F_TPU_REVA_MAA_CTRL_STC;

// Check if MAA Error occurs
Expand Down
Loading