PSoC 6 I2C Stops Working When DFU SDK Included

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

cross mob
RyWi_4724536
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

I have an application that has some I2C communication in it that I am setting up to be an app in a bootloadable project.

Everything works before I set it up as an app.

Going close to CE213903 set up for a basic dfu, I added DFU_SDK Core in build settings, and then set up the dfu_cm0p.ld and dfu_cm4p.ld.

It will compile and run fine, and I can do UART communication and blink an LED no problem. I can also switch between app 0 and app 1 great.

But when I try to send over I2C in either app it will get stuck on Cy_SysLib_ExitCriticalSection(intrState) in mae_i2c_write_byte() -> mae_i2c_write() in mae_i2c.c ->Cy_SCB_I2C_MasterWrite() ->  Cy_SCB_I2C_MasterWrite() in cy_scb_i2c.c -> Cy_SysLib_ExitCriticalSection(intrState) in cy_scb_i2c.c.

Any ideas what could be causing the dfu stuff to interfere with I2C?

Using part CY8C6347BZI-BLD54

0 Likes
1 Solution

Got it figured out. It turns out I wasn't allocating enough flash and/or RAM to it

View solution in original post

0 Likes
3 Replies
lock attach
Attachments are accessible only for community members.
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

Ideally there is no relation between DFU SDK and I2C PDL.

I tried to reproduce the issue at my side and could not succeed. Please find the attached workspace which I tried at my side.

In my workspace App0 is DFU with UART as communication component. App1 is the I2C Master and EzI2C Slave code example (CE220818).

Please use this project and check if the LEDs are chnaging colors for every 2 seconds in your application (after Bootloading).

Please let us know the results.

Thanks

Ganesh

0 Likes

Hi Ganesh,

Looking through your project I see that in the DOWNLOADABE Build Settings CM0->Linker-> Custom Linker Script field is empty. Shouldn't that be set to dfu_cm0p.ld? And also for CM4?

I narrowed down that the error occurs in my project when I switch to using dfu_cm0.ld, and dfu_cm4.ld.

If I use the default linker scripts cy8c6xx7_cm0plus.ld, and cy8c6xx7_cm4_dual.ld then it will work.

Right now I just start with my working project, enable the DFU SDK core in build settings and then switch linker scripts in the build settings. I also add post_build_core1.bat file to the project with PDL set to 3.1.2. Then the error comes up. If I switch back to the default linker scripts then no error

0 Likes

Got it figured out. It turns out I wasn't allocating enough flash and/or RAM to it

0 Likes