Skip to content

Commit

Permalink
fix(PeriphDrivers): Fix MAA Operator Setter for TPU Drivers (#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Carter authored Aug 8, 2024
1 parent c320a28 commit cac32a7
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit cac32a7

Please sign in to comment.