Thanks Jorge.
Meanwhile, I also added a USB Host MSD port to my K66-based custom hardware. Now I need to handle both an SD card on SPI and a memory stick on USB.
In the past I developed a similar application on a K60-based custom hardware using MQX 4.x with its drivers based on MFS for both SD card through SPI and USB memory stick.
So in my current project with PEx I started adding the fsl_sdcard and fsl_usb_framework components, but I don't know how to use them. Can you help me?
I configured the fsl_sdcard component selecting fsl_dspi as inherited driver.
I checked auto initialization for the fsl_sdcard component (is it right?).
I configured the fsl_dspi inherited driver and checked auto initialization also for it.
I see PE generates code for auto initialization the fsl_sdcard component and fsl_dspi inherited driver and I get spi_dspi_layer.c new file in my source folder.
How should I use this generated source file with FatFs or MFS?
I see also a fsl_dspi1_IrqHandler() function is generated in my Events.c source module. Should I add some code into that function?
I configured the fsl_usb_framework component with auto initialization (is it right?) and Host mode enabled with USB_CLASS_MASS_STORAGE as class code, USB_SUBCLASS_MASS_UFI as sub-class code and USB_PROTOCOL_MASS_BULK as protocol.
In the fsl_usb_framework component I keep checked MCU and FMC settings (but I don't know their function and use), I checked Host mode request only and I selected USBCFG_HOST_MCS Host class driver only in Host mode USB stack setting, keeping all the rest at default.
In the cpu.c file generated by PEx the fsl_usb_framework component is initialized calling usb_host_init() and usb_host_register_driver_info() host methods.
And then?
I see also usbFmw1_usb_host_board_init() and usbFmw1_ClassDriver0() functions are generated in my Events.c source module and I should add my code inside them. How should I use them? How should I link FatFs or MFS to the USB Host?
So, is FatFs now the best choise than MFS to handle both SD cards and USB memory sticks on the same platform?
Best Regards,
Alessandro