Processor Expert I2C_LDD missing flexibility capabilities

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Processor Expert I2C_LDD missing flexibility capabilities

601 次查看
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 项奖励
1 回复

397 次查看
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 项奖励