Hi,
I just updated Keil software pack and installed new component "ARM_Compiler". With this update I am not able to access FileSystem anymore.
Each time I call "fmount" function, return code is 9 (fsMediaError).
I selected Filesystem in "Compiler:IO" I didn t change anything else in my code.
I use filesystem with USB and MCI in the same time, both fail.
My board is based on a LPC4337 processor and I am sure the design is correct (if I switch to Keil Midlleware 6.2 and remove ARM_compiler, everything works fine).
Filesystem example doesn t work either.
Did I miss something with this update ?
usually when fmount() returns fsMediaError, media initialization procedure fails.
In Middleware 6.3 support for CMD6 was added, which switches SD clock up to 50MHz. Did you also update LPC4300 device family pack? In LPC4300 DFP 2.3.0, High Speed bus mode is enabled in capabilities. Is it possible that the SD clock frequency is to high?
Yes, I noticed that clock speed was increased. I don't know if it is why it doesn t work anymore, is it possible to remove CMD6 support without removing the entire pack (in a configuration file ?)? (all other pack are up to date).
You can modify MCI driver and set high_speed capability to 0. Middleware library relies on driver capabilities and will not activate high speed mode if driver does not support it.
So, if you remove read only attribute from MCI driver, you will be able to edit it ;)
Robin,
please check also the stack usage in your system. The File I/O may now take a few more bytes on the stack due to the new features.
Reinhard
Problem solved !
It was the high speed capability :) I modified
static const ARM_MCI_CAPABILITIES DriverCapabilities
in MCI_LPC43xx.c to set high_speed to 0
I think it could be great to add this choice as an option in a configuration file.
Many thanks !
Since we would like to replicate the problem here also, is it possible to give us a bit more details about your hardware.
What SD memory card did you use?
I had the problem with an ATP USH-I microSDCard 8GB class 10 (Compliant with SD Specification version 3.01)
But you were right, I just tried with a more common microSDCard (Kingston 4GB class 4) and I did not had the problem with this one. High speed works.
thank you.
We do not have exactly the same SD card in Munich. However we believe that the problem might relate to the signals on your hardware.
Do you have a MCB4300 Evaluation Board? If so, maybe you can test the card on that board.
Here is the explanation:
I use TVS protection for SDCard, The TVS equivalent capacitance combined with lines serial resistors form an equivalent low pass filter which causes some signal integration. This signal integration is too excessive at 50 MHz for my ATP card. If I remove TVS, everything works.
Unfortunately I can't remove them neither decrease resistors value. So I will keep with driver file modification in order to not use high speed.
For USB file System, I had to increase OS Core Thread Stack Size (from 512 to 768). Now everything works as expected.
Thank you both for helping me solving my case !