On the KL25Z, if I write any program that transmits to the USB serial port and download it to the board it will work, but I need to shut down my terminal emulator (Tera Term), start it up again and re-open the serial port before I get anything. Why is this?
I am using Windows 7 - 64 bit.
Here's my test program :
serial port test program
#include "mbed.h"
Serial pc( USBTX, USBRX );
int main() {
int ch = 'A';
while(1) {
pc.putc( ch++ );
if( ch > 'Z' ) {
ch = 'A';
}
wait( 0.25f );
}
}
It may have something to do with the way downloading and restarting is done on the KL25Z which seems to be a bit different to the LPC1768 and LPC11U24. On these, after a download, you just have to press the reset button and away it goes, serial port working fine. However, on the KL25Z I notice that after a download two things are different:
1. The program does not appear on the KL25Z drive (I know this is by design).
2. Windows plays the noise that indicates a disconnected USB device and shortly afterwards plays the noise that indicates a connected USB device. This never happens on the other 2 devices. Serial port now doesn't work until I have restarted the terminal program. It seems to have lost track of the serial port.
Just to be clear, to get it to work I need to do this:
1. Set up Tera Term for the right serial port, baud rate and so on and open the port.
2. Serial data can be seen coming in from the KL25Z.
3. Compile and download my program to the KL25Z.
4. Press the KL25Z's reset button.
5. No serial data can be seen coming in from the KL25Z.
6. Quit from Tera term.
7. Start up Tera Term.
8. Set up Tera Term for the right serial port, baud rate and so on and open the port.
9. Serial data can be seen coming in from the KL25Z.
Do I just have to put up with this, or this there a workaround?
On the other two devices I can just start up Tera Term once at the start of the day and just leave it open all day through multiple compile and download cycles.
On the KL25Z, if I write any program that transmits to the USB serial port and download it to the board it will work, but I need to shut down my terminal emulator (Tera Term), start it up again and re-open the serial port before I get anything. Why is this?
I am using Windows 7 - 64 bit.
Here's my test program :
serial port test program
It may have something to do with the way downloading and restarting is done on the KL25Z which seems to be a bit different to the LPC1768 and LPC11U24. On these, after a download, you just have to press the reset button and away it goes, serial port working fine. However, on the KL25Z I notice that after a download two things are different:
1. The program does not appear on the KL25Z drive (I know this is by design).
2. Windows plays the noise that indicates a disconnected USB device and shortly afterwards plays the noise that indicates a connected USB device. This never happens on the other 2 devices. Serial port now doesn't work until I have restarted the terminal program. It seems to have lost track of the serial port.
Just to be clear, to get it to work I need to do this:
1. Set up Tera Term for the right serial port, baud rate and so on and open the port.
2. Serial data can be seen coming in from the KL25Z.
3. Compile and download my program to the KL25Z.
4. Press the KL25Z's reset button.
5. No serial data can be seen coming in from the KL25Z.
6. Quit from Tera term.
7. Start up Tera Term.
8. Set up Tera Term for the right serial port, baud rate and so on and open the port.
9. Serial data can be seen coming in from the KL25Z.
Do I just have to put up with this, or this there a workaround?
On the other two devices I can just start up Tera Term once at the start of the day and just leave it open all day through multiple compile and download cycles.