How to use S32K144 TRGMUX_IN0 trigger LPUART send data?

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

How to use S32K144 TRGMUX_IN0 trigger LPUART send data?

Jump to solution
798 Views
PYGC
Contributor II

I need a sample code.

 

void init_trgmux(void)
{
    // TRGMUX_IN0
    PCC->PCCn[PCC_PORTB_INDEX] = PCC_PCCn_CGC(1);
    PORTB->PCR[5]= PORT_PCR_MUX(6);

    // TRGMUX_LPUART1_INDEX
    TRGMUX->TRGMUXn[TRGMUX_LPUART1_INDEX] &= TRGMUX_TRGMUXn_SEL0_MASK;
    TRGMUX->TRGMUXn[TRGMUX_LPUART1_INDEX] |= TRGMUX_TRGMUXn_SEL0(TRGMUX_TRIG_SOURCE_TRGMUX_IN0);
}

 

 

0 Kudos
Reply
1 Solution
790 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

what do you want to achieve in fact? E.g. use TRGMUX_IN0 as hw control flow signal for LPUART transmit? Similarly as CTS_B input does?.
As chapter 53.4.8.2 states the LPUART supports one peripheral input trigger (from TRGMUX), that can be configured in one of the following ways.

PetrS_0-1682504905093.png

Configuration is done in PINCFG register.

BR, Petr

View solution in original post

0 Kudos
Reply
2 Replies
791 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

what do you want to achieve in fact? E.g. use TRGMUX_IN0 as hw control flow signal for LPUART transmit? Similarly as CTS_B input does?.
As chapter 53.4.8.2 states the LPUART supports one peripheral input trigger (from TRGMUX), that can be configured in one of the following ways.

PetrS_0-1682504905093.png

Configuration is done in PINCFG register.

BR, Petr

0 Kudos
Reply
783 Views
PYGC
Contributor II
Thank you so much!

I found the order of execution:

1. Configure TRGMUX
2. Configure LPUART (including PINCFG)
3. Write TX data
4. Wait for TRGMUX trigger signal
5. When the trigger signal is asserted, the TX data is automatically sent
0 Kudos
Reply