I am trying to CapSense and I2C working on CY8CKIT-145-40xx using PSoC Creator 4.2. Both the CapSense and the I2C work well separately, but when try combine them, it crashes. Can anyone steer me to a project with CapSense and I2C working together?

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

cross mob
jacoc_3955246
Level 1
Level 1

I am trying to use CapSense and I2C together on a CY8CKIT-145-40xx using PSoC Creator 4.2.  Both the CapSense and the I2C work well separately, but when try combine them, it crashes.  Has anyone else seen this problem?  Can anyone steer me to a project with CapSense and I2C working together?

0 Likes
1 Solution

Well an 046 kit will solve the problem nicely and more.  Here is a link to the part on that board, 128K, you should be good to go with that.   

https://www.cypress.com/part/cy8c4247bzi-l489

The 046 board is a heavy duty cap sense dev kit, so if you need that, then you would be good to go.

Something else to keep in mind.  The Kitprog on a board is really handy for debugging and it makes loading a hex file a tad easier.  The bootloader host program is not hard to use but when you are making quick changes and testing a kitprog loaded board is easy.  Also if you ever want to debug with an LCD and you are doing anything analog that would make you want to print floating point values to the LCD, you will need to change heep size to 0x200, and turn on use of newlib nano float formatting and newlib nano. That will burn about 10k and then your component consumption will add to that making a 32K kit not so usable.  We build prototypes here and would have liked to used 049 PSOC4 kits but if there is a display, its a no go.  We went to using PSOC 5LP 059 kits (lots of memory, cap sense and kitprog $10).  Once we have the design down, we put actual parts we would use in production on breakout boards, validate the design and then move on to a full pcb design in quantities of 5 or 10 and move on from there.   The good news is, you are working with PSOC, where most of the hard work is already done for you between Creator and the way Cypress builds components and libraries.  You will not find this level of ease of design  with any of the rest of the players, we have tried them all. 

View solution in original post

0 Likes
6 Replies
RiGa_1547516
Level 3
Level 3
First like received First like given

I believe that kit has 32K of flash.  Is it possible that the combination of I2C and the CapSense peripherals have run you out of memory.  I had similar issues with the 049 Kit.  When I noticed that I had used 99.4% of flash (reported at the end of the build) it made sense.  Once I backed out most of the peripheries, those that were left worked.  In my case it was I2C_LCD, UART and PWM that could not run on the kit at the same time, but each worked perfectly.

jepaz
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

Hello James,    

Can you share your code?

did you try debugging the program?

you often need a delay after the start of the capsense and the i2c blocks specially the i2c,

0 Likes
jacoc_3955246
Level 1
Level 1

Hi

0 Likes

Well an 046 kit will solve the problem nicely and more.  Here is a link to the part on that board, 128K, you should be good to go with that.   

https://www.cypress.com/part/cy8c4247bzi-l489

The 046 board is a heavy duty cap sense dev kit, so if you need that, then you would be good to go.

Something else to keep in mind.  The Kitprog on a board is really handy for debugging and it makes loading a hex file a tad easier.  The bootloader host program is not hard to use but when you are making quick changes and testing a kitprog loaded board is easy.  Also if you ever want to debug with an LCD and you are doing anything analog that would make you want to print floating point values to the LCD, you will need to change heep size to 0x200, and turn on use of newlib nano float formatting and newlib nano. That will burn about 10k and then your component consumption will add to that making a 32K kit not so usable.  We build prototypes here and would have liked to used 049 PSOC4 kits but if there is a display, its a no go.  We went to using PSOC 5LP 059 kits (lots of memory, cap sense and kitprog $10).  Once we have the design down, we put actual parts we would use in production on breakout boards, validate the design and then move on to a full pcb design in quantities of 5 or 10 and move on from there.   The good news is, you are working with PSOC, where most of the hard work is already done for you between Creator and the way Cypress builds components and libraries.  You will not find this level of ease of design  with any of the rest of the players, we have tried them all. 

0 Likes

Thanks for the advice! That is what I was looking for!

We are ordering the CY8CKIT-046  and hopefully that will solve the problems I have been seeing.

Memory is always an issue.  Usually I go for the largest the then go smaller, but the Cy8CKIT-145 was too attractive.

BTW: The CY8CKIT-046 has a CY8C4248BZI-L489 with 256 KB Flash (EVEN BETTER!!).

Thank you again.

0 Likes

You are very welcome of course.  I like to make D sized copies of the kit schematics for the wall. You need to be careful of the bypass and SAR caps on some of the pins.  If you attempt to use a pin for a UART, I2C, SPI or LCD you will need to remove the cap(s).  This frequently means there may be only one completely clear 8 bit port so pick them carefully and big schematic makes the easy.  Best Regards, Lynn