I have a problem with the I2C GPIO Expander (PCAL6416A) on the Verdin Development Board.
A brief description of the problem:
If I configure the 16 pins as output, it works perfectly. I can switch each pin on and off. Unfortunately, this is not possible with the configuration as an input. Pin 1_3- 1_7 (I1.7 - I1.3) works fine as Input. if the input register is read while the pin is switched, one bit is flipped. When I measure the voltage at these pins with a multimeter, I also measure almost 0V, which is how it should be. On the Pins 1_2- 0_0 (I1.2- I0.0) this dosnt work. Also I can measure almost 1.8V at these pins.
I have the same thing with another Verdin Devboard. So i think this isnt a hardware problem.
I’m just not getting anywhere at this point. Can anyone help?
Could you please share more information about your problem?
- Which OS are you using? Torizon, BSP… Which Version?
- What module and carrier board are you using?
- You mentioned “Cortex-M” in the ticket title, are you trying the use the M4 microprocessor?
Also, I didn’t understand what you mean by those pins. Are these pins related to our devboard?Or is it something else?
We use Torizon. But that should not matter here, because we want to control the I2C Gpio expander with the Cortex-M. The Cortex-A is currently not yet booted.
At the moment we use ther Verdin Development board V1.1B
Yes we are using the M4 microprocessor. That works well for us. As already mentioned I have no problems when the GPIO expander (the pins) are configured as output. There I can switch all pins. I have only problems with the Input.
These are the marked pins. These go to the pin headers X8 and X10. There they are called EX_1 - EX_16
Torizon is run A cores so if you are using Torizon - Cortex-A is booted. Moreover you can not boot M core(s) without booting an A core.
How exactly you are configuring the GPIO expander? Could you provide compilable test project so we can try to described repro issue locally
We used the SDK sample project for I2C Rtos from NXP for this. The read and write functions for the I2C work there without any problems.
Below I show you what I described for registers for the input pins:
Configuration register pair (06h, 07h)
Set both to 0xFF, to set the Pins
Pull-up/pull-down enable register pair (46h, 47h)
Set both to 0xFF, to enable Pull-ups/Pull-downs
Pull-up/pull-down selection register pair (48h, 49h)
Set both to 0x00, to have an input with pulldown
That is all I have done. and so the above problem exists.
COuld you share a download path to the SDK sample project for I2C Rtos from NXP and your project in compilable form?