I'm a beginner in MCUXPresso and FRDM or kinetis microcontrollers.
I'm trying to use a LPUART RX interrupt handler. But If I send a single character it doesn't work.
for example If I send
'A' the interrupt handler doesn't work.
next
'B' interrupt handler works but LPUART_ReadByte returns 'A' (last byte).
I think it's FIFO related problem but I'm still not sure how to fix it.
OR
RxData Register doesn't get full. (I tried changing uart data bit size and stop bits but still doesn't work).
Experts please help me.
Thank you in advance.
Here is my LPUART init code.
Solved! Go to Solution.
Hello Edgar Eduardo.
I'm using MKE15Z256VLL7 (FRDM - KE02Z board).
I'm using getDefaultConfig
(which has
config.txFifoWatermark = 0;
config.rxFifoWatermark = 0; ) I've also tried adding these lines but still interrupt gets triggered at the second byte.
:smileysad:
Regards.
Hello Edgar Eduardo.
I'm using MKE15Z256VLL7 (FRDM - KE02Z board).
I'm using getDefaultConfig
(which has
config.txFifoWatermark = 0;
config.rxFifoWatermark = 0; ) I've also tried adding these lines but still interrupt gets triggered at the second byte.
:smileysad:
Regards.
Hi Angar,
Are you using MKE15Z device in a FRDM-KE02 board? I wouldn't recommend this, as KE15 and KE02 are not fully compatible devices.
Now, assuming that you are using SDK for KE15Z and that you already checked the lpuart_interrupt example, then, the way you received data will depend in your interrupt handler and in your while loop, for instance, the example implements a loopback, I would recommend you to check this example and verify if your interrupt is correctly triggered.
Best regards
Hi Jorge.
I'm sorry what i meant was FRDM - KE15Z. yeah I checked the example. But still the interrupt gets triggerred only after it receives the 2nd byte. ..
Hello Angar.
Try adding that instructions before calling LPUART_Init
config.txFifoWatermark = 0;
config.rxFifoWatermark = 0;
Watermark levels determinate how many bytes receive and transmit before executing IRQ handler.
Which MCU are you using?
Some Kinetis MCU's don't have FIFO functionality and the last corrections aren't going to fix your issue.
Let me know your results.
Regards.