LPC55S69 Flexcomm I2C pin priority

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC55S69 Flexcomm I2C pin priority

ソリューションへジャンプ
1,319件の閲覧回数
Henrico
Contributor I

Hi all,

I'm currently developing a modular system using the available flexcomms on the LPC55S69. I am trying to develop a library in which the user can pick a flexcomm and select a protocol, e.g. I2C, I2S, SPI or UART. To configure the pinout I am using MCUExpresso IDE to configure each flexcomm to use 5 unique pins that are capable of running each protocol. For example, this is the configuration for FLEXCOMM1:

Screenshot from 2021-06-04 14-22-00.png

The protocol is selected in the application code and is determined by the sensor that is connected.

I've tested all interfaces and I2C is the only one that is giving me problems. I think the issue is that there are 2 pins configured for SDA (71&40) and 2 for SCL (72&93) in the same flexcomm and it looks like these pins interfere with each other when both enabled and I2C is selected as protocol. The following line of code is used to initialize a flexcomm to use I2C:

- (void)FLEXCOMM_Init(base, FLEXCOMM_PERIPH_I2C);

 

It works perfectly after disabling one I2C pair in the pinout configuration, but some other protocols are then also disabled. The goal is not to have to change the pinout with every new sensor that is connected.

Does one of the I2C pins have priority over the other and is it possible to select which pins have priority? Or is it simply not possible to have FCX_CTS_SDA_SSEL0 + FCX_RXD_SDA_MOSI_DATA and FCX_RTS_SCL_SSEL1 + FCX_TXD_SCL_MISO_WS enabled on the same flexcomm and use I2C?

 

ラベル(2)
タグ(3)
0 件の賞賛
1 解決策
1,280件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Henrico,

I haven't I2C sensor to connect with Flexcomm1, so I test the Flexcomm4.

If there are two(more than one) SCL signal pins enabled, the I2C can't work,

it seems this is the hardware limitation, so please check whether can disable one between the two pins:

72 (FC1_RTS_SCL_SSEL1) and 93 (FC1_TXD_SCL_MISO_WS)

Or change one pin to another that doesn't include SCL function.(I help you checked it , it seems doesn't have suitable one).

If no, I think you only can use another Flexcomm as I2C function.

 

 

BR

Alice

 

 

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
1,300件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Henrico,

Could you please share the project that can reproduce this issue,

just includes the pin config and I2C code is enough, I will check it on my side.

 

BR

Alice

0 件の賞賛
1,294件の閲覧回数
Henrico
Contributor I

Hello,

I have created a new project using MCUExpresso to reproduce this issue. I have verified the issue using an LPC55S69 development board and reading the device ID from the MAX11301 for testing I2C. However, any other I2C sensor should work. Pin 71, 72, 40, 10 and 93 are configured for FlexComm 1.

The following steps can be used to reproduce the issue:

  1. Connect an I2C sensor to pin 9 (SDA) and 11 (SCL) on P19 of the LPC55S69 development board
  2. Configure the slaveaddress and a read register in main.c of the project
  3. Debug the program and check the console for received messages
    • Since both SDA pins, 71 (FC1_CTS_SDA_SSEL) and 40 (FC1_RXD_SDA_MOSI_DATA), and both SCL pins, 72 (FC1_RTS_SCL_SSEL1) and 93 (FC1_TXD_SCL_MISO_WS), are enabled, it doesnt work.
  4. Disable pin 40 and 93 in the pin configuration tool
  5. Debug the program again
    • This time it should work as expected

The problem is that I need all pins to be configured as Flexcomm, since the protocol that is used depends on the sensor that will be connected.

0 件の賞賛
1,281件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Henrico,

I haven't I2C sensor to connect with Flexcomm1, so I test the Flexcomm4.

If there are two(more than one) SCL signal pins enabled, the I2C can't work,

it seems this is the hardware limitation, so please check whether can disable one between the two pins:

72 (FC1_RTS_SCL_SSEL1) and 93 (FC1_TXD_SCL_MISO_WS)

Or change one pin to another that doesn't include SCL function.(I help you checked it , it seems doesn't have suitable one).

If no, I think you only can use another Flexcomm as I2C function.

 

 

BR

Alice

 

 

0 件の賞賛