I2C Master using mtb-hal-cat1 version 2.0.1

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

cross mob
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello Infineon support team.

I'm evaluating I2C master using following environment.
- EVB: CY8CKIT-062S2-43012
- Tool: Modus ToolBox version 2.4.0
- Template App: I2C Master

By default, mtb-hal-cat1 version is 1.6.0. I can see an expected I2C behavior.
However, if mtb-hal-cat1 version is 2.0.1, I2C does not work fine. The "handle_error()" code is called because all buffer[] are "0" value.

=========
<main.c>
Line 285:
/* Check packet structure and status */
if ((PACKET_SOP == buffer[PACKET_SOP_POS]) &&
(PACKET_EOP == buffer[PACKET_EOP_POS]) &&
(STS_CMD_DONE == buffer[PACKET_CMD_POS]))
{
/* Next command to be written. */
cmd = (cmd == CYBSP_LED_STATE_ON) ?
CYBSP_LED_STATE_OFF : CYBSP_LED_STATE_ON;
}
else
{
handle_error(); ★★ Called this code if mtb-hal-cat1 version 2.0.1.
}
==========


Can I have your any advice to fix this issue?

Thanks,
Tayo

0 Likes
1 Solution
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello 

I have resolved with following code modification.

org) cyhal_i2c_slave_config_read_buff

new) cyhal_i2c_slave_config_write_buffer

org) cyhal_i2c_slave_config_write_buff

new)yhal_i2c_slave_config_read_buffer 

 

Thanks,

Tayo

 

 

View solution in original post

0 Likes
2 Replies
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @tayo,

I recreated the project as described by you:

- EVB: CY8CKIT-062S2-43012
- Tool: Modus ToolBox version 2.4.0
- Template App: I2C Master

The project works fine for mtb-hal-cat1 version 2.0.1.

Can you share the project here so that we can recreate and take a closer look at the issue?

Best regards,
Nikhil

0 Likes
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello 

I have resolved with following code modification.

org) cyhal_i2c_slave_config_read_buff

new) cyhal_i2c_slave_config_write_buffer

org) cyhal_i2c_slave_config_write_buff

new)yhal_i2c_slave_config_read_buffer 

 

Thanks,

Tayo

 

 

0 Likes