Import UDB-based I2S Component in a PSoC 6 MCU Project (PSoC Creator) – KBA229971
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Author: EktaN_26 Version: **
Translation - Japanese: PSoC 6 MCUプロジェクトでのUDBベースのI2Sコンポーネントのインポート(PSoC Creator)- KBA229971 - Community Translated (JA)
Do the following to use the existing UDB-based I2S component (available for PSoC® 4 and PSoC 5LP devices) in a PSoC 6 MCU project using PSoC Creator™.
1. Navigate to the Components tab in the Workspace Explorer. Right-click the PSoC 6 MCU project and select Import Component.
Figure 1. Import Component in Workspace Explorer
2. In the Import Component dialog, update the following selections, and click OK.
Figure 2. Import UDB Based I2S Component
All files associated with the imported I2S Component are shown under the Components tab in the Workspace Explorer.
3. Double-click the “I2S_v_70.cystate” file as shown in Figure 3, and make the following changes under PSoC 6 Architecture:
<State>Production</State>
<Severity>None</Severity>
Figure 3 Changes in the .cystate file
4. Right-click on the I2S_v2_70 Component present in the Workspace Explorer and select Add component Item. In the Add Component Item dialog, select Schematic Macro under Implementation. Uncheck the Target generic device and select PSoC 6 from the Family drop-down as shown in Figure 4.
Figure 4. Adding Schematic Macro Fil
A new schematic macro (I2S_v2_70_0..cymacro) file is created under PSoC6 folder, as shown below:
Figure 5. New Schematic Macro File in PSoC 6
5. Crop the files I2S_Rx.cymacro, I2S_RxTx.cymacro, and I2S_Tx.cymacro and add them under the PSoC6 folder. Delete the I2S_v2_70_01.cymacro file as shown below:
Figure 6. Adding .cymacro Files to PSoC6 Folder
Note: PSoC Creator will show errors because the pins connected to the imported Component are not supported for the selected device.
6. Navigate to the I2S_RxTx.cymacro file and delete the existing pins connected to sdi, sdo, sck, and ws and connect the supported input pin and clock to the sdi and clock inputs. Repeat the same for the I2S_Rx.cymacro and I2S_Tx.cymacro files.
Figure 7. Connect Compatible Pins and Clock
7. To make the Component visible in the Component catalog, open the I2S_RxTx.cymacro file and right-click the schematic, and select Properties.
Figure 8. Component Catalog
8. In Properties, set the Doc.CatalogVisibilityExpression and Doc.MacroVisibleInCatalog values as true (see Figure 9. Make similar changes for in the I2S_Rx.cymacro and I2S_Tx.cymacro files.
Figure 9. Schematic Macros Properties
9. Open the I2S_v2_70.cysym file. Right-click on the schematic and select Properties, and then make the settings to true as shown in Figure 10.
Figure 10.Schematic Properties
10. In the I2S.c file, replace #include <CyLib.h> with #include <project.h>. In the I2C_PVT.h file, replace
#include <cytypes.h> with #include <project.h>
Figure 11. I2S.c File
11. Save the changes and use UDB-based I2S Component in the project.
Figure 12. Workspace Explorer