UART2 in KEAZ128 is causing problems

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

UART2 in KEAZ128 is causing problems

1,078 Views
tonymor90
Contributor I

Hello I have to use the 3 uarts that I have available, using UART0 and UART1 are working fine once I add UART2 i cannot run my application ( but I can debug it without any problem ).

UART2 initialization 

pastedImage_2.png

UART0 and UART1 

pastedImage_3.png

The only difference is the baudrate, but everything else is the same, but when I call UART2 I cannot run my application only if I am in debug mode.

I have seen something weird each time I change the priority back and forward I can run the application 1 time but after the first time it stops working again

0 Kudos
6 Replies

864 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Hugo Moran,

   I create a cw KEA128 project, which based on PE, and contains 3 UARTs.

   UART0:PTAA2,PTA3, send out 0XAA

   UART1:PTF2,PTF3, send out 0X11

   UART2: PTD6,PTD7 , send out 0X22

   LED pin:PTC0, will always blink.

My test platform is TRK-KEA128 revD board.

All the 3 uart works OK on my side.

So, I think you can check my project and test it on your side directly.

Please find the project from the attachment.

 

Wish it helps you!

After you test my project, please let me know the test result.

Just make sure whether the 3 uart can works OK together on your side.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

864 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Hugo,

     From your description, I think the problem still in the software side.

     You said if you are using debug mode, it works OK, could you also share your project, and tell me what the IDE you are using? I will help you to check it.

     When you just download it to your chip, you said it can't work, how you judge it?

     If you comment UART0 and UART1, just leave UART2, whether it works OK without the debug mode?

    It's better to share your code, you can delete all other code which is important to you, just leave the three UART which can reproduce the problem.

    You said: I change the priority back and forward I can run the application 1 time but after the first time it stops working again.

    Please give me more details, eg, how you modify the code.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

863 Views
antoniomoran
Contributor II

Yes, I think is software side but I don't know what could it be.

I am using Codewarrior, I will attach the project so you can check it.

I was able to judge it because I have an LED that blinks when I am reseting my other devices that are connected to the microcontroller but  when I add UART2 it gets stuck and y does not blink anymore, once I remove UART2 init everything works fine again.

I already tried just using UART2 but it did not work.

I was changing the priority manually with codewarrior and then I was trying to test back again.

0 Kudos

862 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Hugo,

    Where is your main function? In which file?

pastedImage_1.png

    Can your simplify your project, just leave the three UART and the LED code, then I will be easy to reproduce your problem, and check the details.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

862 Views
tonymor90
Contributor I

Hello,

TargetMain_Main is my main, that project should run if you click yes, because that's my main.

I cannot simplify the project it has a lot of callbacks to different files to make it work, I will send you the path to the UART configuration and LED.

If i simply the code it wont be possible to compile it 

TargetMain.c Function 

BLE_TPMS\BLE_TPMS\Sources\PlatformPackage\ActualPackage

UAR.c

BLE_TPMS\BLE_TPMS\Sources\PlatformPackage\ActualPackage\HalPackage

GPIO.c is for LED

BLE_TPMS\BLE_TPMS\Sources\PlatformPackage\ActualPackage\HalPackage

Lin.c has the configuariton for UART2, the one that does not work

BLE_TPMS\BLE_TPMS\Sources\PlatformPackage\ActualPackage\HalPackage

0 Kudos

861 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Hugo Moran,

   This is the click the yes result:

pastedImage_1.png

I will create a new project which use the 3 uart, then send it to you.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos