lpi2c3 on m33 core

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpi2c3 on m33 core

202 Views
Sandroom
Contributor II

Good day to all!
I am using IMX8ULPIEC processor and I want to use i2c3 on m33 core.
I looked at sai_edma_transfer example (for evk9 board)and encountered a problem. The example uses lpi2c0, I would like to use lpi2c3, replacing 0 with 3 in places related to lpi2c I did not achieve the result. According to my assumption, lpi2c3 is on the fusion bus pcc2. Is it possible to use i2c3 with the m33 core and maybe there is some example of initialization and sending data?

Labels (1)
Tags (3)
0 Kudos
Reply
4 Replies

190 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @Sandroom!

Thank you for contacting NXP Support!

 

The changes that you made was only on sai_edma_transfer.c?

What are the changes that you made off?

 

Do you update the pin_mux.c to configure the pins?

 

Best Regards!

Chavira

 

0 Kudos
Reply

166 Views
Sandroom
Contributor II

Chavira, thank you for helping me with my question.

I made the following changes to pin_mux:

in func BOARD_InitPins(void) Instead of i2c0 pins, I initialize i2c3: pta8,9-> pta14,15

 

    IOMUXC_SetPinMux(IOMUXC_PTA14_PTA14, 0U);
    IOMUXC_SetPinConfig(IOMUXC_PTA14_PTA14,
                        IOMUXC_PCR_OBE_MASK);
    IOMUXC_SetPinMux(IOMUXC_PTA15_PTA15, 0U);
    IOMUXC_SetPinConfig(IOMUXC_PTA15_PTA15,
                        IOMUXC_PCR_OBE_MASK);

 

 also in BOARD_I2C_ConfigurePins(void
 

 

    IOMUXC_SetPinMux(IOMUXC_PTA14_I3C0_SCL, 0U);
    IOMUXC_SetPinConfig(IOMUXC_PTA14_I3C0_SCL,
                        IOMUXC_PCR_ODE_MASK);
    IOMUXC_SetPinMux(IOMUXC_PTA15_I3C0_SDA, 0U);
    IOMUXC_SetPinConfig(IOMUXC_PTA15_I3C0_SDA,
                        IOMUXC_PCR_ODE_MASK);

in sai_edma_transfer.c
i use  Fusion_Init() and some else functions:

 

CLOCK_SetIpSrc(kCLOCK_Lpi2c3,  kCLOCK_Pcc2BusIpSrcFusionDspBus);
RESET_PeripheralReset(kRESET_Lpi2c3);
CLOCK_GetIpFreq(kCLOCK_Lpi2c3)
but when using the last three I get a call to HardFault_Handler.

 
it was just said in one of the other answers (link) that the cores cannot use foreign peripherals (for example, sending data from the m33 core via sai4, which belongs to the A35 core) or is this not true?
0 Kudos
Reply

161 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @Sandroom!

You configured wrong the pins for i2c3, you are configuring the pins for i3c0, you should use ptb8-9 or ptb11-12.

 

Best Regards!

Chavira

0 Kudos
Reply

121 Views
Sandroom
Contributor II
@Chavira thank you for the quick reply, it seems that I was inattentive, I reconfigured to pins ptb8-9 but this did not remove the error(HardFault_Handler) when calling the functions CLOCK_SetIpSrc, RESET_PeripheralReset and CLOCK_GetIpFreq (I call them with the parameters from the previous message) am I passing the wrong values ​​to them? Please tell me what could be wrong.
0 Kudos
Reply