Regarding the occurrence of LPUART interrupt? in 144k

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

Regarding the occurrence of LPUART interrupt? in 144k

ソリューションへジャンプ
967件の閲覧回数
DKTempest
Contributor I

I was downloading some examples from this community.

And I did some modifications to fit the board I had.

But my question is at what point an interrupt occurs and sends data.

In the case of GPIO, I understand that it occurs via input, And Time interrupts occur according to the divided clock.

But I don't know the exact point of occurrence of UART interrupt.
I used an LCD with 4800 baud rate.

I didn't know the exact point even when I used step_into (F5) menu of debug menu.

I am attaching my code and operation picture below.

DKTempest_0-1621217637607.png

 

 

0 件の賞賛
返信
1 解決策
954件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

there are several interrupt sources in LPUART. It is summarized in chapter 53.4.7 Interrupts and status flags of the RM. Also refer to STST and CTRL registers.

In your code you have just RIE bit set, so interrupt will be called after RDRF bit is set, indicating you have received data. You can put reading STAT register in beginning of you interrupt routine to know the interrupt source.

Seems you does not have RX pin configured, it may case module detect RX pin low, making character detection (RDFD set), thus you enter interrupt (unintentionally) and leave it after all is send as you are using polling for transmission.
So set RX pin, probably PC6 pin. You have PC9 and PC7, which both has just TX functionality. 

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
955件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

there are several interrupt sources in LPUART. It is summarized in chapter 53.4.7 Interrupts and status flags of the RM. Also refer to STST and CTRL registers.

In your code you have just RIE bit set, so interrupt will be called after RDRF bit is set, indicating you have received data. You can put reading STAT register in beginning of you interrupt routine to know the interrupt source.

Seems you does not have RX pin configured, it may case module detect RX pin low, making character detection (RDFD set), thus you enter interrupt (unintentionally) and leave it after all is send as you are using polling for transmission.
So set RX pin, probably PC6 pin. You have PC9 and PC7, which both has just TX functionality. 

BR, Petr

0 件の賞賛
返信
941件の閲覧回数
DKTempest
Contributor I

I checked the part where I set the wrong port.

However, I didn't have to provide TX because the LCD of the board I use only provides RX ports.

Well, if I may apply your words, Is it correct that the RX pin of s32k144 is detected unconditionally because the TX of LCD does not exist?

0 件の賞賛
返信
921件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if the LCD does not send anything, so RX pin on MCU is not used then keep it pulled high and do not use RX interrupt to send data to LCD. Either use polling or enable TX interrupt when transfer is desired.

BR, Petr

0 件の賞賛
返信