- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
My goal: Integrating an SDCard and putting on a "FAT" filesystem on a PSoC 6.
But what I find (or not find) is, that, according to Migrating from PSOC5 to PSOC6, with emFile, MTB 2.0 doesn't provide the "emFile" library that seems to cover this topic in the PSoC Creator IDE.
Does that mean that currently there is no library covering "SD Card Drivers" and "Filesystems" for the PSoC 6 on MTB?
Cheers Nik
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi NiRo_4598436,
There is no official library support for SD Card file system yet. Our internal teams are working on providing a library support for the same.
Like CaKu_4284131 mentioned it depends on the device that you are using. If the device that you are using does not have a fixed SDHC block (for example - CY8CKIT-062-BLE) then you can refer to the example shared above by CaKu_4284131 and refer to this thread - Porting FatFs to PSoC 6. This uses SPI SCB block to interface with the SD Card.
If the device that you are using has a fixed SDHC block (for example - CY8CPROTO-062-4343W) then I have attached an example project for the same. The project reads all the directories and files present in the SD Card and displays it on the terminal. It then creates/opens a file and writes a line of text which is then read back and displayed on the terminal. The terminal output is as shown -
Please refer to this KBA for steps to import the project into ModusToolbox - Sharing My Eclipse Project
Please let me know if you have any queries.
Thanks and Regards,
Rakshith M B
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess it depends on which PSoC 6 variant you are running. If yours has an SD Host (SD Host Controller), there are other forum threads about that. Mine is PSoC 63, so I had to find an SPI-driven solution.
If you can use Mbed OS (Cypress products with Mbed OS - | Mbed ) (Cypress Mbed OS Documentation: Getting Started with PSoC 6 MCU and CYW43xxx in Mbed OS ), support for a FAT Filesystem on SD Card driven by SPI is built in.
See:
FATFileSystem - APIs | Mbed OS 5 Documentation
and
SDBlockDevice - APIs | Mbed OS 5 Documentation
I am running a FAT filesystem on SD card in an AdaLogger Shield ( https://www.adafruit.com/product/1141 ) (https://learn.adafruit.com/adafruit-data-logger-shield/overview ) on a PSoC® 6 BLE Pioneer Kit (CY8CKIT-062-BLE) (https://www.cypress.com/documentation/development-kitsboards/psoc-6-ble-pioneer-kit-cy8ckit-062-ble ) in ModusToolbox 2.0 (https://www.cypress.com/products/modustoolbox-software-environment ).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi NiRo_4598436,
There is no official library support for SD Card file system yet. Our internal teams are working on providing a library support for the same.
Like CaKu_4284131 mentioned it depends on the device that you are using. If the device that you are using does not have a fixed SDHC block (for example - CY8CKIT-062-BLE) then you can refer to the example shared above by CaKu_4284131 and refer to this thread - Porting FatFs to PSoC 6. This uses SPI SCB block to interface with the SD Card.
If the device that you are using has a fixed SDHC block (for example - CY8CPROTO-062-4343W) then I have attached an example project for the same. The project reads all the directories and files present in the SD Card and displays it on the terminal. It then creates/opens a file and writes a line of text which is then read back and displayed on the terminal. The terminal output is as shown -
Please refer to this KBA for steps to import the project into ModusToolbox - Sharing My Eclipse Project
Please let me know if you have any queries.
Thanks and Regards,
Rakshith M B
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your posts. I'll try it out!
Cheers