toto_brico
Member
Hello all,
We are designed a "big" application/prog base on a Teensy 4.1 with the main features :
We spent the last 2 weeks at identified clearly the dysfunctional of our programme and making trap for it... without a great succes, hence my post.
The issue is that it happens that communication, with the PC by the serial, stop, only for the transmitting, the reception still work and the program still work in real time (no crash)
All the serialX are managed with serialEvent() function.
We don't know why and which reason can cause that. The only way, we have is to restart the Teensy.
BUT, our program works well during days (with Serial and serial2(DMX), and Can bus) if we don't use the Serial1. Each time the Serial stop working, is when we sent many messages on the serial1.
So, my question is : Can you thing that something on Serial1(hardware serial) can cause an dysfunctionning of serial(USB)?
During my investigation (forum and libraries), I realized that it could happen that we send more chars than the SERIAL1_TX_BUFFER_SIZE. Can be the cause of our issue?
To be sure, is the SERIAL1_TX_BUFFER_SIZE at 64 bytes by default, if we don't used Serial1.addMemoryForWrite() function?
Many many thanks in advance for your help or advice,
We used T4.1 and Teensyduino 1.55
we also try with a PC on Win7 and others in Win10
We are designed a "big" application/prog base on a Teensy 4.1 with the main features :
- USB/Serial that communicate with a PC (VB prog used during 4 years with others ECU) connected with the USB connector and the Serial library @ 115.2kbit (only "usefull" for the VB app), this com is always runing, 2/3 message in Tx and Rx per seconde
- Serial1 to communicate with other device @ 57.6kbit, messages are send to the device only some times acording to input events(physical or CAN)
- Serial2 for a DMX communication (all time runing)
- Can Bus com (with other T4.X)
We spent the last 2 weeks at identified clearly the dysfunctional of our programme and making trap for it... without a great succes, hence my post.
The issue is that it happens that communication, with the PC by the serial, stop, only for the transmitting, the reception still work and the program still work in real time (no crash)
All the serialX are managed with serialEvent() function.
We don't know why and which reason can cause that. The only way, we have is to restart the Teensy.
BUT, our program works well during days (with Serial and serial2(DMX), and Can bus) if we don't use the Serial1. Each time the Serial stop working, is when we sent many messages on the serial1.
So, my question is : Can you thing that something on Serial1(hardware serial) can cause an dysfunctionning of serial(USB)?
During my investigation (forum and libraries), I realized that it could happen that we send more chars than the SERIAL1_TX_BUFFER_SIZE. Can be the cause of our issue?
To be sure, is the SERIAL1_TX_BUFFER_SIZE at 64 bytes by default, if we don't used Serial1.addMemoryForWrite() function?
Many many thanks in advance for your help or advice,
We used T4.1 and Teensyduino 1.55
we also try with a PC on Win7 and others in Win10