SD write block on LPC540xx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SD write block on LPC540xx

535 Views
giuseppe_sama
Contributor I

Good morning,

I read without problems an SD card on LPC540 trought "SD/MMC and SDIO interface".

Now I am writing a single block to SD (CMD24) and I transfer all the block (512 bytes) trought FIFO (32 bit depth and 32 bit width) without problems. But at end of transmission (latest 32 FIFO word transmitted), I receive the DCRC bit (Data CRC error) in RINTSTS register.

In effect, I transmitted 512 bytes without CRC16, but I don't know the register for save the CRC16. I need to calculate it for the block and transmit it? I need to transmit 512+2 bytes?

Thanks.

0 Kudos
1 Reply

466 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Giuseppe,

 

You do not need to calculate the CRC, the module should add it by itself. Just so I can have more information, what happens if you read the same data you have written to the SD card? Is the data corrupted?

 

Please let me know your findings.

 

Best regards,

Felipe

0 Kudos