Solved! Go to Solution.
1. "User need to also ensure that PIO0_4 and PIO0_5 are pulled-up."
The basic function of a pull-up is to insure that given no other input, a circuit assumes a default value. See e.g. resistors - What is a pull up and pull down? - Electrical Engineering Stack Exchange for an introduction. So, no: this requires no change to your code, but you must check your physical setup.
2. "The I2C IRQ handler is implemented in the I2CIO mod. In case this module is not linked in the application, the application itself needs to implement it."
This is about the interrupt handler only, and a general comment in case you are moving away from the example or demo code. The example application app_example_dp_i2c does take the I2CIO module in, so there is no need to do something extra there. But since the I2CIO module provides an implementation of I2C0_IRQHandler, and you make your own application without this module, you will have to provide your own implementation of I2C0_IRQHandler yourself (likely just copying and pasting it somewhere).
Best,
Dries.
1. "User need to also ensure that PIO0_4 and PIO0_5 are pulled-up."
The basic function of a pull-up is to insure that given no other input, a circuit assumes a default value. See e.g. resistors - What is a pull up and pull down? - Electrical Engineering Stack Exchange for an introduction. So, no: this requires no change to your code, but you must check your physical setup.
2. "The I2C IRQ handler is implemented in the I2CIO mod. In case this module is not linked in the application, the application itself needs to implement it."
This is about the interrupt handler only, and a general comment in case you are moving away from the example or demo code. The example application app_example_dp_i2c does take the I2CIO module in, so there is no need to do something extra there. But since the I2CIO module provides an implementation of I2C0_IRQHandler, and you make your own application without this module, you will have to provide your own implementation of I2C0_IRQHandler yourself (likely just copying and pasting it somewhere).
Best,
Dries.
Hi Dries Moors,
Thanks a lot, Sir.
I got more understanding.
Another question:
If I use polling event handler instead of interrupt based handler, that is, using item 1 instead of item 2 as below, I don't need I2C0_IRQHandler in this case, right?
1. Chip_I2C_SetMasterEventHandler(I2C0, Chip_I2C_EventHandlerPolling);
2. Chip_I2C_SetMasterEventHandler(I2C0, Chip_I2C_EventHandler);
Thanks,
Arna