TC39X reconfigure uart

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
oferorgal
Level 1
Level 1
5 questions asked 5 sign-ins First reply posted

Hello,

In my application I want to configure the uart, send data, re-configure the uart and send more data.

The first configure works and the data is send but in the second configure i'm stuck on the while: 

unlock_wdtcon();
UARTBASE->CLC.U = 0;
lock_wdtcon();

UARTBASE->CSR.B.CLKSEL = 0;
while (UARTBASE->CSR.B.CON != 0);

In the first config I set the CLKSEL to be 2.

 

What did i'm not doing right?

0 Likes
3 Replies
Meet_T
Moderator
Moderator
Moderator
100 solutions authored 25 likes received 50 solutions authored

Hi @oferorgal ,

 

We tried the same thing at It is working for us (CSR.B.CON = 0 after setting CSR.B.CLKSEL = 0). Could you please provide the entire code file if possible so we can check if anything else in the code is affecting the value. Also, kindly let us know if you getting some trap while debugging or not.

 

Can you please let us know which address is UARTBASE pointing to?

 

Best Regards,

Meet.

0 Likes
oferorgal
Level 1
Level 1
5 questions asked 5 sign-ins First reply posted

Hi Meet,

The address is 0xF0000600. I'm not in a trap, I just stuck because UARTBASE->CSR.B.CON is on (i.e. 0x1).

For me it also works if I call it multiple times but it doesn't work if I already send data, configure other stuff and then call uart init again

0 Likes
Meet_T
Moderator
Moderator
Moderator
100 solutions authored 25 likes received 50 solutions authored

Hi @oferorgal ,

 

Your second statement is not quite clear can you  please elaborate it? What is meant by If I call it (does it mean uart_init function?) multiple times?  Also there has been no mention of uart_init() previously in the description, could you provide more information about it. Are you using iLLD functions in it? If you could provide your entire code sequence it would be helpful for use to reproduce the issue and debug it.

 

Best Regards,

Meet.

0 Likes