FLEXIO Driver I2C

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

FLEXIO Driver I2C

2,547件の閲覧回数
Rakesh_Kumar-Thakur
Contributor III

Hi NXP,

Hi, I am working on board imx93evk, I want to control LVDS brightness using flexio driver with I2c, the base board I2C device is ADP5585ACxZ-01-R7 at address 0x34 pin LVDS_BLT_PWM, I have data sheet for ADP5585ACxZ but I don't know much about how to use this i2c device as slave and resistor configuration. And how to control LVDS brightness using this device. Please provide example with document if possible.

Thanks

Rakesh Kumar Thakur
Screenshot from 2024-10-21 18-07-03.png

0 件の賞賛
返信
8 返答(返信)

2,530件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

HI @Rakesh_Kumar-Thakur!

Thank you for contacting NXP Support!

 

You can take a look to the next device tree for imx93 EVK.

In  this file is already configured the pwm.

 

Best Regards!

Chavira

0 件の賞賛
返信

2,512件の閲覧回数
Rakesh_Kumar-Thakur
Contributor III

Hi Chavira 

Thank you very much for your reply. I am working on this further. If I have any doubts, I will connect with you.

 

Best regards.

Rakesh Kumar Thakur

 

2,453件の閲覧回数
Rakesh_Kumar-Thakur
Contributor III

Hi NXP,

Hello @Chavira

Thanks for connecting actually a want to control LVDS Back light brightness  using LPI2C2 bus 

  1. slave address i want to used 0x34 (ADP5585ACxZ-01-R7)  please provide information about can we use this address as a slave or not
    Screenshot from 2024-10-21 18-07-03.png

 

/* FUNCTION ************************************************************************************************************
*
* Function Name : BOARD_InitPins
* Description : Configures pin routing and optionally pin electrical features.
*
* END ****************************************************************************************************************/
void BOARD_InitPins(void) { /*!< Function assigned for the core: Cortex-M33[cm33] */
IOMUXC_SetPinMux(IOMUXC_PAD_GPIO_IO02__FLEXIO1_FLEXIO02, 1U);
IOMUXC_SetPinConfig(IOMUXC_PAD_GPIO_IO02__FLEXIO1_FLEXIO02,
IOMUXC_PAD_DSE(15U) |
IOMUXC_PAD_FSEL1(2U) |
IOMUXC_PAD_OD_MASK);
IOMUXC_SetPinMux(IOMUXC_PAD_GPIO_IO03__FLEXIO1_FLEXIO03, 1U);
IOMUXC_SetPinConfig(IOMUXC_PAD_GPIO_IO03__FLEXIO1_FLEXIO03,
IOMUXC_PAD_DSE(15U) |
IOMUXC_PAD_FSEL1(2U) |
IOMUXC_PAD_OD_MASK);
IOMUXC_SetPinMux(IOMUXC_PAD_UART2_RXD__LPUART2_RX, 0U);
IOMUXC_SetPinConfig(IOMUXC_PAD_UART2_RXD__LPUART2_RX,
IOMUXC_PAD_PD_MASK);
IOMUXC_SetPinMux(IOMUXC_PAD_UART2_TXD__LPUART2_TX, 0U);
IOMUXC_SetPinConfig(IOMUXC_PAD_UART2_TXD__LPUART2_TX,
IOMUXC_PAD_DSE(15U));
}


/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_I2C_ConfigurePins:
- options: {callFromInitBoot: 'true', coreID: cm33}
- pin_list:
- {pin_num: C20, peripheral: LPI2C1, signal: lpi2c_scl, pin_signal: I2C1_SCL, SION: ENABLED, OD: ENABLED, PD: DISABLED}
- {pin_num: C21, peripheral: LPI2C1, signal: lpi2c_sda, pin_signal: I2C1_SDA, SION: ENABLED, OD: ENABLED, PD: DISABLED}
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
*/

/* FUNCTION ************************************************************************************************************
*
* Function Name : BOARD_I2C_ConfigurePins
* Description : Configures pin routing and optionally pin electrical features.
*
* END ****************************************************************************************************************/
void BOARD_I2C_ConfigurePins(void) { /*!< Function assigned for the core: Cortex-M33[cm33] */
IOMUXC_SetPinMux(IOMUXC_PAD_I2C2_SCL__LPI2C2_SCL, 1U);
IOMUXC_SetPinConfig(IOMUXC_PAD_I2C2_SCL__LPI2C2_SCL,
IOMUXC_PAD_DSE(15U) |
IOMUXC_PAD_FSEL1(2U) |
IOMUXC_PAD_OD_MASK);
IOMUXC_SetPinMux(IOMUXC_PAD_I2C2_SDA__LPI2C2_SDA, 1U);
IOMUXC_SetPinConfig(IOMUXC_PAD_I2C2_SDA__LPI2C2_SDA,
IOMUXC_PAD_DSE(15U) |
IOMUXC_PAD_FSEL1(2U) |
IOMUXC_PAD_OD_MASK);
}

/***********************************************************************************************************************
* EOF
**********************************************************************************************************************/
0 件の賞賛
返信

2,448件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @Rakesh_Kumar-Thakur!

 

Do you want to control the PWM under M core?

 

 

0 件の賞賛
返信

2,441件の閲覧回数
Rakesh_Kumar-Thakur
Contributor III
0 件の賞賛
返信

2,340件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

HI @Rakesh_Kumar-Thakur!

 

We don't have the driver to control the ADP5585ACxZ-01-R7  under M core.

 

Best Regards!

Chavira

0 件の賞賛
返信

2,433件の閲覧回数
Rakesh_Kumar-Thakur
Contributor III

Hi @Chavira 

can we used Can I replace LPI2C1 with LPI2C2

Overview
========
The flexio_lpi2c_interrupt example shows how to use flexio i2c master driver in interrupt way:

In this example, a flexio simulated i2c master connect to a LPI2C slave

SDK version
===========
- Version: 2.15.000

Toolchain supported
===================
- IAR embedded Workbench 9.40.1
- GCC ARM Embedded 12.2

Hardware requirements
=====================
- USB Type-C cable
- MCIMX93-EVK board
- J-Link Debug Probe
- 12V~20V power supply
- Personal Computer

Board settings
==============
The example requires doing connection between FLEXIO1(as master) pins and LPI2C1(as slave) pins.
- LPI2C1_SCL(J1005-3), IOMUXC_PAD_GPIO_IO02__FLEXIO1_FLEXIO02(J1001-3) connected
- LPI2C1_SDA(J1005-5), IOMUXC_PAD_GPIO_IO03__FLEXIO1_FLEXIO03(J1001-5) connected

Note
Please run the application in Low Power boot mode (without Linux BSP).
The IP module resource of the application is also used by Linux BSP.
Or, run with Single Boot mode by changing Linux BSP to avoid resource
conflict.

Prepare the Demo
================
1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW301 to power on the board.
2. Connect a USB Type-C cable between the host PC and the J1401 USB port on the target board.
3. Open a serial terminal with the following settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
4. Download the program to the target board.
5. Either re-power up your board or launch the debugger in your IDE to begin running the example.

Running the demo
================
When the example runs successfully, you can see the similar information from the terminal as below.

~~~~~~~~~~~~~~~~~~~~~
FlexIO I2C interrupt - LPI2C interrupt
Master will send data :
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F

Slave received data :
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F
~~~~~~~~~~~~~~~~~~~~~

0 件の賞賛
返信

2,355件の閲覧回数
Rakesh_Kumar-Thakur
Contributor III

Hi @Chavira 

Hi What happened about replay?

0 件の賞賛
返信