Hi Kerry,
I have this problem fixed already. And I thought I replied in the forum. But today, after seeing your email, I went into the forum, and looked again, I didn't find my post last time. damn!
So, here is the explanation: (my unsuccessful posting last time)
I think I have this problem resolved. DCP functions in "fsl_dcp.c" use varables which are allocated in stack. In my program, stack is in OCRAM, which is cache enabled.
So, putting the crc32 calculation output data buffer into non-cache area is NOT enough, must make sure those temporary varables are also not cacheable. So, I forced those temporary varables to static, so that they go to DTCM. Then my testing code becomes successful.
The 2 temporary variables in fsl_dcp.c that I mentioned are: "dcp_work_packet_t dcpWork = "; and "dcp_hash_ctx_t hashCtx;"
Thanks again for any supports from anybody here!
zhang2018tz
|
|
zhang2018tz@126.com
|
签名由网易邮箱大师定制
On 4/10/2020 15:17,kerryzhou<admin@community.nxp.com> wrote:
|
|
NXP Community
|
|
Re: RT1060 SDK DCP CRC32 problem
reply from Kerry Zhou in i.MX RT - View the full discussion
Hi zhang tz
Sorry for my later reply!
Today, I test your project, can reproduce your problem, I also define your API in the internal RAM directly, but without the cache closed, the crc still not correct.
__RAMFUNC(RAM) void TestCrc32(void)
In fact, the SDK DCP code also disable the cache.
You mentioned:I've seen some discussions here saying if DCP writes to non-cache places, it should work fine.
Could you please give me the related link? I also need to check it.
Kerry