Multi-implementation Custom Component

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.
cadi_1014291
Level 6
Level 6
25 likes received 10 likes received 10 likes given

Greetings all 😄

   

I have some spare time and i will like to build some custom components that work on PSoC 5LP and PSoC 4 (all or most of the families, 4200, 4M, 4L, 4S), the component is based on a SPI Master plus some other components.

   

My problem is that PSoC 4200 doesn't have the same SPI (SCB based) that PSoC 5LP (UDBs or FF based), so i think i must do a schematic implementation for 4200 and another one for 5LP.

   

I find out that the PWM component have been implemented similar to what i need (see image attached), there's one schematic implementation for each PSoC Architecture(?), but i can't find where or how can Creator 'know' what PSoC we are using on the design, and based on that choose the appropriate implementation.

   

   

Any ideas on how can i solve this problem?, i have not found information about this in the forum or documentation, or maybe i'm not searching properly.

   

Thanks in advance, any suggestion will be welcome :D, attached a Workspace with PWM and SPI components imported to see how the components works internally.

   

Carlos

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Carlos, open some Cypress component files (*.h, *.c, *.v), e.g. Timer, and there are conditional compilation constants for PSoC4, 5, etc.

View solution in original post

0 Likes
4 Replies