MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 17, 2019 07:10PM |
Registered: 6 years ago Posts: 124 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 18, 2019 04:21AM |
Registered: 11 years ago Posts: 6,409 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 18, 2019 05:44AM |
Registered: 6 years ago Posts: 124 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 19, 2019 07:06AM |
Registered: 11 years ago Posts: 6,409 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 19, 2019 10:29AM |
Registered: 6 years ago Posts: 124 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 19, 2019 11:04AM |
Registered: 11 years ago Posts: 6,409 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 19, 2019 11:25AM |
Registered: 6 years ago Posts: 124 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 19, 2019 06:01PM |
Registered: 5 years ago Posts: 1 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 20, 2019 06:57AM |
Registered: 6 years ago Posts: 124 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 24, 2019 07:22AM |
Registered: 6 years ago Posts: 124 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 24, 2019 09:04AM |
Registered: 11 years ago Posts: 6,409 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 24, 2019 10:17AM |
Registered: 6 years ago Posts: 124 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? August 26, 2019 02:50PM |
Registered: 11 years ago Posts: 6,409 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? September 16, 2019 09:00AM |
Registered: 6 years ago Posts: 124 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? September 28, 2019 10:34AM |
Registered: 6 years ago Posts: 124 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? October 02, 2019 08:05AM |
Registered: 6 years ago Posts: 124 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? October 02, 2019 02:33PM |
Registered: 11 years ago Posts: 6,409 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? November 11, 2019 05:03PM |
Registered: 8 years ago Posts: 167 |
#define SERIAL_PORT_1 0 #define BAUDRATE_1 230400 #define SERIAL_PORT_2 2 #define BAUDRATE_2 115200
#define SERIAL_PORT_1 2 #define BAUDRATE_1 115200 #define SERIAL_PORT_2 0 #define BAUDRATE_2 230400Così il mio display funziona, ma l'host su USB non interagisce.
startstartecho:echo:MK4duo_4.4.0echo:Last Updated: 08-11-2019 | Author: (MiaCNC, none)echo:Compiled: Nov 11 2019echo:Free Memory: PlannerBufferBytes: echoD card okecho:Create Eecho:Create Hecho:Create Bedecho:Create Chamberecho:Create Fanecho:Create Fanecho:Create driver echo:Create driver echo:Create driver echo:Create driver echo:Factory Settings Loaded
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? November 16, 2019 03:23PM |
Registered: 6 years ago Posts: 124 |
Si come avevo già segnalato io a Settembre non mette l'EndOfLine sulla seconda seriale.Quote
Fabius72
Alberto, se ti può essere utile nel capire il problema, questo è l'output che si ottiene dall'USB appena viene connessa (con definizioni del secondo tentativo):
startstartecho:echo:MK4duo_4.4.0echo:Last Updated: 08-11-2019 | Author: (MiaCNC, none)echo:Compiled: Nov 11 2019echo:Free Memory: PlannerBufferBytes: echoD card okecho:Create Eecho:Create Hecho:Create Bedecho:Create Chamberecho:Create Fanecho:Create Fanecho:Create driver echo:Create driver echo:Create driver echo:Create driver echo:Factory Settings Loaded
#define SERIAL_EOL() SERIAL_CHR('\n')
#define SERIAL_EOL() SERIAL_OUT(print, "-EOL;")E ricompilando il firmware ottengo da Serial0:
...Testing Z connection... OK-EOL;Testing T0 connection... OK-EOL;wait-EOL;wait-EOL;wait-EOL;wait-EOL;wait-EOL;wait-EOL;wait-EOL;...
...waitwaitwaitwaitwaitwaitwaitwaitwaitwaitwaitwaitwaitwait...
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? November 17, 2019 11:29AM |
Registered: 7 years ago Posts: 1,059 |
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? November 17, 2019 03:03PM |
Registered: 11 years ago Posts: 6,409 |
if (buffer_ring.isEmpty() && !Com::serialDataAvailable() && last_command_timer.expired(NO_TIMEOUTS)) { SERIAL_STR(WT); SERIAL_EOL(); }
#define SERIAL_STR(str) Com::printPGM(str)
void Com::printPGM(PGM_P str) { while (char c = pgm_read_byte(str++)) { if (serial_port_index == -1 || serial_port_index == 0) MKSERIAL1.write(c); #if NUM_SERIAL > 1 if (serial_port_index == -1 || serial_port_index == 1) MKSERIAL2.write(c); #endif } }
#define SERIAL_EOL() SERIAL_CHR('\n')
#define SERIAL_CHR(c) SERIAL_OUT(write, c)
#if NUM_SERIAL > 1 #define SERIAL_OUT(WHAT,V...) do{ \ if (serial_port_index == -1 || serial_port_index == 0) (void)MKSERIAL1.WHAT(V); \ if (serial_port_index == -1 || serial_port_index == 1) (void)MKSERIAL2.WHAT(V); \ }while(0) #else #define SERIAL_OUT(WHAT,V...) (void)MKSERIAL1.WHAT(V) #endif
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? November 19, 2019 02:44PM |
Registered: 6 years ago Posts: 124 |
Quote
MagoKimbra
Non riesco davvero a capire perché solo l'accapo non va...
EDIT: Azzo azzo azzo... Ho capito... Porca miseria che erroraccio che ho fatto...
Il file communication.h viene incluso prima di HAL in platform.h quindi non ha ancora NUM_SERIAL a > 1 perché è HAL di ogni processore che lo setta se la seriale impostata va bene per quel processore oppure no.. Quindi non viene compilata la parte della doppia scrittura in SERIAL_OUT, ma la singola...
EDIT EDIT: Fixato... Potresti provare....
E grazie...
Re: MK 4.3.9 (e 4.3.8) Seconda seriale come si attiva ? November 22, 2019 04:16AM |
Registered: 8 years ago Posts: 167 |