serial line of a TWR60 is not sending data if using processor expert

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

serial line of a TWR60 is not sending data if using processor expert

668 Views
mkrug
Contributor II

Hello,

 

since a couple of days I work with the TWR60 to get used to the K60µC.

 

I tried out some of the examples. One of them is described in chapter 3 in:

http://cache.freescale.com/files/soft_dev_tools/doc/user_guide/PEXDRVGETSTARTEDUG.pdf

 

I do this to get used to the ProcessorExpert. In this example a GPIO and the serial line is used.

 

So far the blinking diode works. But the serial line does not. It simply did not send any data. To find out more about the problem I wrote the return value of AS1_SendBlock() in a variable to see how many characters the software thinks it has send. Interestingly I always got back 8 - however the string "HelloWorld" consist of 11 (including \n).

Anyone an idea what is going wrong here ? Does one have a simple working project that uses the serial line that I can copy as a clean start point ?

 

So far I have not tried the same thing without ProcessorExpert. My intention was to get rid of the low-level software configuration and use that tool for it.

 

Best Regards

Markus

 

 

0 Kudos
3 Replies

390 Views
konrada
Contributor IV

Hi, I'm afraid this can't be easily debugged within the abstraction level of PE.

 

check

  • PORTC_PCR17: is the pin mapped to function 3 (UART3_TX, see K60 reference manual, chapter 10)?
  • UART3_C2: is the UART active?
  • if you write one byte to UART3_D, does it arrive?
  • UART3_S1 and _S2: any interesting error flags or lack of ready-flags?
  • your clock settings: the divisor in UART3_BDH/BDL must correspond to the actual clock speed used.

 

0 Kudos

390 Views
mkrug
Contributor II

Hello,

 

I understand that it is not easy to debug this on the level of PE. But if someone can check my settings this might be already of help for me.

 

1.) I am using the TWR Kit for the K60

2.) I set the jumper J3 to Pos 2-3 to route 50MHz clock to CLOCKIN0

3.) I set the clock settings according to http://cache.freescale.com/files/soft_dev_tools/doc/user_guide/PEXDRVGETSTARTEDUG.pdf (see below)

 

 

4.) I set the UART3 settings as shown below:

 

 

So with that setting I hope everything should be OK concerning the clock and pin routing issues.

5.) I am using a NULL-Modem cable between the TWR Kit and my PC

 

 

If I transmit 1 Byte nothing changes - which means I do not receive any character from the TWR.

 

Having a closer look to the transmit function of PE I discovered that it only tries to send the character the first time that I call that function. If I program a loop that calls that function forever it jumps out by checking if the previous transmission is completed (hence, assuming it is not). However, even the first transmission did not show me the character in my terminal program on my PC.

The UART_S1 flag is always on 0x88 and hte UART_S2 on 0x00 - in my understanding that should be OK for transmitting data.

 

 

 

Any ideas ?

 

Best Regards

Markus

 


konrada wrote:

Hi, I'm afraid this can't be easily debugged within the abstraction level of PE.

 

check

  • PORTC_PCR17: is the pin mapped to function 3 (UART3_TX, see K60 reference manual, chapter 10)?
  • UART3_C2: is the UART active?
  • if you write one byte to UART3_D, does it arrive?
  • UART3_S1 and _S2: any interesting error flags or lack of ready-flags?
  • your clock settings: the divisor in UART3_BDH/BDL must correspond to the actual clock speed used.

 


 

0 Kudos

390 Views
BlackNight
NXP Employee
NXP Employee

Hello,

make sure you use a straight (not crossed) serial cable between the PC and the TWR-SER.

 

BK

0 Kudos