Processor Expert I2C_LDD missing flexibility capabilities

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Processor Expert I2C_LDD missing flexibility capabilities

748 Views
pavelst
Contributor II

Hello,

We are using Processor Expert with IAR and Kinetis K very successfully until now with all LDD drivers.

Now we need to connect a special I2C device, for which the regular PE driver behavior is not good and we find ourselves in a need to rewrite the PE generated code.

The missing capabilities are:

1. In MasterReceiveBlock() and MasterReceiveBlock() we need to send only the address without the data.

Currently there is a check there "if (Size == 0x00U) return ERR_OK;", so if we call this without buffer then also the address is not getting sent.

As a way around it, we just want to disable this check, and continue sending the address also when buffer length is zero.

2. We would like to make an I2C read without sending the address beforehand, and MasterReceiveBlock() always starts by sending the address.

As a way around it, we think of making a different version of the same function in our custom file, and removing the address sending code.

What are the preferred solutions for our situation?

Maybe the PE team can improve the I2C_LDD driver to include our requested functionality?

Thank you,

Pavel

0 Kudos
Reply
1 Reply

544 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Pavel:

As a workaround, you may modify code in the I2C functions as necessary, and disable code generation *only* for the I2C_LDD component. Check the next screenshot for reference:

Code_generation.png

The disadvantage is that if you want to modify the component settings, then you have to enable Code Generation, and your code changes will be lost.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply