SPRUJ27C November 2022 – November 2023 TMS320F280033 , TMS320F280034 , TMS320F280034-Q1 , TMS320F280036-Q1 , TMS320F280036C-Q1 , TMS320F280037 , TMS320F280037-Q1 , TMS320F280037C , TMS320F280037C-Q1 , TMS320F280038-Q1 , TMS320F280038C-Q1 , TMS320F280039 , TMS320F280039-Q1 , TMS320F280039C , TMS320F280039C-Q1
The functions Fapi_doPsaVerify() and Fapi_calculatePsa() make use of the Parallel Signature Analysis (PSA) algorithm. Those functions are typically used to verify a particular pattern is programmed in the Flash Memory without transferring the complete data pattern. The PSA signature is based on this primitive polynomial:
f(X) = 1 + X + X^2 + X^22 + X^31
uint32 calculatePSA (uint32* pu32StartAddress,
uint32 u32Length, /* Number of 32-bit words */
uint32 u32InitialSeed)
{
uint32 u32Seed, u32SeedTemp;
u32Seed = u32InitialSeed;
while(u32Length--)
{
u32SeedTemp = (u32Seed << 1)^*(pu32StartAddress++);
if(u32Seed & 0x80000000)
{
u32SeedTemp ^= 0x00400007; /* XOR the seed value with mask */
}
u32Seed = u32SeedTemp;
}
return u32Seed;
}