Wiring SPI Slave via Smart I/O

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
UrPl_1236626
Level 4
Level 4
10 likes given First solution authored 50 replies posted

Hi,

I have issues wiring SPI in Slave mode via Smart I/O, as it keeps saying that MOSI, MISO and SCK pins are driven twice (as the Cypress was testing it against master configuration instead of Slave). Attached below is the test project.

However also tried the Master mode and it fails on MISO connection with the same error message (driven twice).

However, if Smart I/O is selected as Input for this particular Data, then fitter says no driver on the net.

It looks like a PSoC Creator bug, using version 4.2.0.641, PDL 3.0.4

BR Uros

0 Likes
13 Replies
AchimE_41
Employee
Employee
10 sign-ins 5 sign-ins First comment on KBA

Hello Uros,

I can confirm the issue and will forward it to our Creator team for a deeper analysis.

kind regards,

Achim

Thank you Achim.

Ask them also if there is some work-around or quick-fix please as atm the devel is blocked due to this issue.

0 Likes

Hi,

I think the fastest workaround would be to do the setup on register basis.

The smartIOs are no rocket science and only consist of ~20 registers, where 16 are basically the same just for a different LUT (LUT_CTRL and LUT_SEL). so technically 6 registers

All information can be found in the Architecture TRM and the Register TRM of the MCU.

Achitecture TRM: http://www.cypress.com/file/420571/download

Register TRM: http://www.cypress.com/file/385656/download (PSoC 62, but doesn't make a difference)

give me a minute and I will create a code snipped.

kind regards,

Achim

0 Likes

True, and how to convince a proper SCB in Creator?

(as I would rewire all of the MOSI, MISO, SCK, SS pins via Smart I/O)

0 Likes
lock attach
Attachments are accessible only for community members.

Attached is the project, I have not tested it as I don't have a PSoC 61 here But I think it is working.

To convince a SCB to work with the SmartIO is simple. Just configure the SCB as usual. In the smartIO control by setting the Bypass bit to '0' it will insert the SmartIO logic between the Pin and SCB.

In case there is anything unclear, please let me know.

PS: Another idea would be to put an unconfigured SmartIO in your schematic and use the generated APIs to set it up.

kind regards,

Achim

0 Likes

Sorry I forgot something,

There is a limitation to the SmartIO that it does not control the OutputEnable signal that some peripherals do modify. so that needs to be considered.

0 Likes

Hi Achim,

have you maybe got any reply from PSoC Creator people?

KR Uros

0 Likes

Hi Uros,

No, I am sorry, there was no solution found yet.

regards,

Achim

0 Likes

Hi Achim, again any update from Creator Team

0 Likes

Hello Uros,

Is it possible for you to take a look at the Smart IO configurator in ModusToolbox? I just tried your configuration in that and did seem to build fine without any issues. You should be able to build and use a PSoC 61 project ModusToolbox without any issues. Let me know if you face any issues with the tool in general.

pastedImage_0.png

Regards,

Meenakshi Sundaram R

Thank you for the tip Meenakshi,

It looks like Modus is not yet able to provide aux logic, as I need to implement a kind of a SPI multiplexer with custom logic wired via DSI to other pins.

Anyway I am extremely happy to be able to run it (finally) under Linux

UrPl_1236626
Level 4
Level 4
10 likes given First solution authored 50 replies posted

This Question has not been answered and has wrong status, since the ModusToolbox does not provide further wiring of I/Os via logic and UDB's which is the case I want to create inside the PsoC Creator 4.2

So ModusToolbox is not a solution.

0 Likes
lock attach
Attachments are accessible only for community members.
UrPl_1236626
Level 4
Level 4
10 likes given First solution authored 50 replies posted

There are more "bugs" for example wiring the data4..data7 to pins without using some logic, like AND, NOT, .. etc fails at digital placement.

See attached project.

0 Likes