Disclaimer: Treat this project as an example. The custom component used here is not 100% tested. There can be issues associated with the component.
Similar to the PSoC3/5LP based emFile code example, theproject also uses emFile library. However, unlike the PSoC3/5LP based projectPSoC4 families does not have a PSoC Creator emFile component. Hence we have createda custom component. Both SCB and UDB based options are there.
For switching between SCB and UDB, enable the appropriatepage and disable the other page.
In the file emFile.h , line# 29 interchange the definitionbetween SCB_SPI_BLOCK and UDB_SPI_BLOCK.
#define SPI_BLOCK_USED SCB_SPI_BLOCK ->For SCB
#define SPI_BLOCK_USED UDB_SPI_BLOCK ->For UDB
The libraryfiles have been already added to the project. For a brand new project, the libraryfiles needs to be added. For the detailed steps on this, refer to the emFilecomponent datasheet of PSoC3/5LP component. Steps are almost similar.
For testing the project the following items are required,
- SD card breakout Board
- 2GB SD card
1) Make connections between the breakout board and theCY8CKIT-042 BLE.
- GND -> GND
- 3V3 -> 3.3V
- MISO -> P0.1
- MOSI -> P0.0
- SCLK -> P0.3
- CS -> P1.2
2) Program the attached project on to a CY8CKIT-042 BLE KIT.
3) Open the COMPORT associated with the Kit using anyTerminal software (Hyterteminal, TeraTerm, CoolTerm etc). BaudRate=115200
4) Insert an empty SD card (upto 2GB size).
5) Press Reset button (SW1) of the kit and check the messages displayed on the COMPORT terminal.
6) Once the example project has been completed remove the SDcard and connect it to the PC. You can see that a file, and directory with the same file would have been created.
Note: The project has not been tested with other PSoC4 family devices.
Comments