Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

User19909
Level 3
Level 3
First like received
Hello,

I am trying to read a section from Pflash with DMA and I need to validate the contents of this section using FCE.

Start Address: A00A0000
End Address: A04DBEDF

So, I am trying to read 4439775 bytes and calculate CRC for this section using FCE to compare it with a generated one for the same section.

The problem is I cant seem to configure the DMA to read this range in one channel in order to be able to calculate CRC in the same way that it was calculated in the first generated one to compare both.

How to make sure that the DMA is not outputting data to FCE registers faster than the FCE can handle and compute, are there buffers in FCE, how is the sync between them managed?

How can I do so if you may help!
Thank you!
4 Replies
MoD
Employee
Employee
5 likes given 250 sign-ins 25 likes received
1 DMA channel setting can be move up to ~1MByte. This is max. TREL * 16 (max. BLK mode) * 32 bits. To copy more bytes you can use a link list. With link list is a new DMA setting is loaded in the channel and executed at the end of transaction. Please see UM chapter 18.3.4.9 Linked List Operations
0 Likes
User19909
Level 3
Level 3
First like received
yes got it.

a question regarding DMA with FCE, if FCE is configured as auto reload, and I am going to read let's say 1MB, I understand that the input data register for FCE is 32 bits so I will divide the PFLASH to 32 bits chunks with DMA to input for FCE.
but I understand that the FCE length is 16bits max, if it is configured for Auto reload length, will the FCE accumulate the last CRC value of the last 16 bits length CRC calculation result when it reloads a new 16bit length or will it calculate a new CRC and the last one is lost and I will have to store the last result before a new autoreload?
0 Likes
MoD
Employee
Employee
5 likes given 250 sign-ins 25 likes received
I don't work already with FCE but I expect in case of Auto reload length the FCE will continue calculation and you should not store the result after autoreload. Maybe you can test it with small portion of data.
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
You might also consider just using CRC32, which already matches the DMA's SDCRC calculation. Then you could do a dummy transfer (i.e., from PFLASH into RAM), and bypass the FCE, which will be much faster.
0 Likes