CYPD3171-24LQXQ_pb add I2C master, but build fail

Announcements

Live Webinar: USB-C adoption. Simple & Cost-efficient solutions | April 18th @9am or 5pm CEST. Register now !

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

cross mob
HuEd_3452391
Level 3
Level 3
25 sign-ins First like received 10 sign-ins

Hello

I'm using CYPD3171-24LQXQ_pb, and set CCG_TYPE_A_PORT_ENABLE to 0u in stack_params.h, then delete the whole TypeA Page in TopDesign.cysch -> Build successfully

Create a new page as I2C on TopDesign.cysch , Drag A I2C Component as master to I2C page, then assign sda to pin7, scl to pin8

-> Build successfully

Add below code to main.c after ccg_app_task_init ();

    SCB_I2C_INIT_STRUCT config;

    SCB_I2CInit(&config);

-> then Build fail, any steps i missing? Please help to check the procedure I apply, Thanks

Source : CYPD3171-24LQXQ_pb_i2cmaster.7z - Google Drive

Regards

Edward

0 Likes
1 Solution
MallikaK_22
Moderator
Moderator
Moderator
50 likes received 750 replies posted 250 solutions authored

Hi Edward,

Please refer to the below application note to implement I2C functions in your project:

1) I2C master example project on PSoC 4: https://www.cypress.com/documentation/code-examples/ce95363-i2c-master-using-serial-communication-bl...

You can add I2C initial in main() .Add other operations in app.c and call it in function void ccg_app_task(uint8_t port).

Best Regards,

Mallika

View solution in original post

0 Likes
1 Reply
MallikaK_22
Moderator
Moderator
Moderator
50 likes received 750 replies posted 250 solutions authored

Hi Edward,

Please refer to the below application note to implement I2C functions in your project:

1) I2C master example project on PSoC 4: https://www.cypress.com/documentation/code-examples/ce95363-i2c-master-using-serial-communication-bl...

You can add I2C initial in main() .Add other operations in app.c and call it in function void ccg_app_task(uint8_t port).

Best Regards,

Mallika

0 Likes