cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6

UrPl_1236626
New Contributor II

Hi,

I have a problem with the I2C on pins P6[4] and P6[5] and SCB[8] which works when in Slave Mode, however I need the master mode, which it fails to use this I placement, using PSoC Creator 4.3 and silicon CY8C6247BZI-D34, and the project is attached below.

Looking like there is rouing issue for option DS#2 as per data-sheet page 14/63, If I release the SPI placed on P6[] in SCB[6] then looks like PSoC picks the ACT#7 option and it works, however this is per design not possible, as I need the SPI for other uses.

Is this PSoC Creator bug, which allows Slave to work but Master not, or is it internal device routing limitation?

Kind regards,
Uros

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator

Hi UrPl_1236626​,

SCB 8 is a deep sleep capable SCB that works only in I2C slave and SPI slave mode.

pastedImage_0.png

Also, if you are using SCB[6] for SPI, then SCB[6] can't be configured for I2C (6.4, 6.5), therefore PSoC Creator chose SCB[8] for I2C (can only be configured as slave). Therefore after you release SPI from using SCB[6], you can configure SCB[6] as I2C. Only one operation is possible at a time (but you can time multiplex).

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
9 Replies
BragadeeshV
Moderator
Moderator

Hi UrPl_1236626​,

SCB 8 is a deep sleep capable SCB that works only in I2C slave and SPI slave mode.

pastedImage_0.png

Also, if you are using SCB[6] for SPI, then SCB[6] can't be configured for I2C (6.4, 6.5), therefore PSoC Creator chose SCB[8] for I2C (can only be configured as slave). Therefore after you release SPI from using SCB[6], you can configure SCB[6] as I2C. Only one operation is possible at a time (but you can time multiplex).

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
UrPl_1236626
New Contributor II

Thank you Bragadeesh for quick answer.

Time multipexing would be possible in my case, is there any hint how to create both blocks within the creator and enable and disable SPI, I2C with all the pin routing, or is it the only way to "hack" the registers and I/Os manually by doing both configurations and doing the "diff" and manually importing the API ?

0 Likes
TiSc_1146951
New Contributor II

Have you considered implementing your I2C Master with a spare UDB?

0 Likes
BragadeeshV
Moderator
Moderator

Hello,

As TiSc_1146951​ mentioned, creating an I2C master with a UDB resource can also be considered if you are going to continue with PSoC Creator.

PDL provides low level drivers to configure an SCB block at run time without placing them in TopDesign. Refer the PDL documentation (intro section) of each SCB block (I2C/ SPI) for the firmware flow to configure the SCB block dynamically. If you can use MTB IDE, it provides HAL layer to easily configure and release HW resources at run time. We recommend you to evaluate that as well.

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes
UrPl_1236626
New Contributor II

I am not using MTB IDE as I have tried it some time ago and was not mature enough and it didn't support custom logic at that time, will retry if this is now in mature stage.

UDB: tried that already but doesn't fit in, due to other custom (UDB) logic.

The quickest solution in my case will be then the software I2C, as it is needed just to setup some config once awhile.

Thank you for prompt replies and hints!
Uros

0 Likes
UrPl_1236626
New Contributor II

Hi Bragadeesh,

checked the ModusToolbox but couldn't locate tools or app note how to design custom UDB and add custom logic, as verilog?

Could you provide any more info on that?

Kind regards,
Uros

0 Likes
BragadeeshV
Moderator
Moderator

Hi UrPl_1236626​,

If you need to develop your own peripherals using UDB, you need to use PSoC Creator IDE for the same. Currently, there is no support for UDB in ModusToolbox IDE. However, we have few community contributors like RoNo_264271 who have been successfully able to import UDB components from PSoC Creator to ModusToolbox. You can use it for reference. However, please note that this method isn't officially recommended/ tested by Cypress.

How do I create a custom UDB solution in the Modus toolbox?

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes
UrPl_1236626
New Contributor II

Hi Bragadeesh,

thank you for pointing out this possibility. Is there an "official" application note that would describe how to properly design and add a custom component to the MTB, ready as a "complete block" for later reuse, and

possibly to be able to publish it as external component either as open-source or pre-compiled object code (which object code would include the logic configuration) ?

Kind regards,
Uros

0 Likes
BragadeeshV
Moderator
Moderator

Hi UrPl_1236626​,

Currently MTB doesn't support adding custom components to the design and therefore we do not have a document explaining the same. This is something in the pipeline and will be available in the future versions. If you are looking for adding custom UDB components, we recommend you to use PSoC Creator. Ensure that the chosen device is supported in Creator.

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes
Top labels