We've been able to get the NFC to function normally without ECC enabled but once we set NFC_CFG_ECCMODE to 7 all sorts of weird things start happening. Reads and writes will block indefinitely in some cases and polling the ECC status bits always returns a correction fail if anything was actually written to the page. I've gotten it to the point where I can see ECC values being written to the page (2048+64 spare with 60 used for ECC) but reading still returns CORFAIL and occasionally weird artifacts that would suggest that previous operations have not completed, even though we're using ISR_IDLE to determine when to enter the next command.
Controller: MK20FX512VLQ12
Flash: S34ML08G101TF100
Has anyone found any code or documentation for this peripheral? We're struggling with the rather sparse documentation in the programming guide which only really spells out the registers and a handful of higher level concepts
Hi Patrick,
We have example including nfc driver code for TWR-K70F120M, the main difference from your case might be the port size, K70 interfaces the nand flash by 16bit width, you have to change it to 8bit width. Please kindly fetch it from the following link:Kinetis 120MHz bare metal sample code
You may find the driver in the folder of "src\drivers\nfc".
Hope that helps,
Have a great day,
Kan
NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------