f32c / arduino

FPGArduino source
http://www.nxlab.fer.hr/fpgarduino
68 stars 44 forks source link

No serial output #6

Closed goran-mahovlic closed 8 years ago

goran-mahovlic commented 9 years ago

This simple example does not return serial

void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(19200); }

void loop() { Serial.print("1"); Serial.print("2"); Serial.print("3"); Serial.print("4"); Serial.println("5"); }

and this one is working

// initialize serial communication at 9600 bits per second: Serial.begin(19200); }

void loop() { Serial.print("1"); Serial.print("2"); Serial.print("3"); Serial.println("4"); }

emard commented 9 years ago

Both examples work on ulx2s You probably use HEX protocol (blind upload, no CRC) and noisy serial port which.

It is essential to get BIN protocol in ujprog working on your board because it has CRC and assures clean upload.

ujprog is tested only on 115200, and may require tweaking the timeouts for 19200

goran-mahovlic commented 9 years ago

and now with 115200 and with binary CRC upload serial is still not working good

when I try example

void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(115200); }

void loop() { Serial.print("1"); Serial.print("2"); Serial.print("3"); Serial.print("4"); Serial.println("5"); }

I got only one response from serial and it breaks and stops sending

emard commented 9 years ago

On Thu, Aug 13, 2015 at 09:35:16AM -0700, Goran Mahovlic wrote:

and now with 115200 and with binary CRC upload serial is still not working good

when I try example

void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(115200); }

if this with delay is working then f32c is probably OK, but usbserial firmware has problems keeping up with "high" speed of 115200 baud

void loop() { Serial.print("1"); delay(1000); Serial.print("2"); delay(1000); Serial.print("3"); delay(1000); Serial.print("4"); delay(1000); Serial.println("5"); delay(1000); }

I got only one response from serial and it breaks and stops sending


Reply to this email directly or view it on GitHub: https://github.com/f32c/arduino/issues/6#issuecomment-130752599

goran-mahovlic commented 8 years ago

I have tested, and serial is working normaly under linux, but on windows it is not working, I have talked with emard and he sugested to refresh USB to serial after loading sketch. I have found microsoft tool that do this from console it is called devcon after disabling and enabling USB serial is working... It is hard to get this tool

http://www.robvanderwoude.com/devcon.php http://techlikes.com/2010/09/25/devcon-problem-in-windows-7-solved.html http://karuppuswamy.com/wordpress/2010/06/05/how-to-plug-in-and-plug-out-usb-device-through-command-line-in-windows/

after I did this serial started to work https://yadi.sk/i/2S0jrrtVkvvak

Is there any way that we automatize two commands ...

emard commented 8 years ago

Goran

Please note that this issue is probably due to your numato usb-serial onboard PIC firmware is buggy.

You might like to connect standard ftdi 3.3 usbserial to PMOD connector and you will see all usbserial issues will be gone.

If it is so, you can send to numato bug report on the PIC firmware serial problem