I'm using ST Link V2 for programming and an ftdi serial adapter connected to PA9, PA10 on an stm32F401.
This works fine for serial print of data to the Arduino serial monitor.
However I cannot get it to input characters, as the serial event function is not called.
Using the example serial event program I have inserted the following line :
HardwareSerial Serial1(PA10, PA9); //change serial to Serial1
Then changed all the Serial to Serial1.
and renamed the serial event call :
void serialEvent1()
Clearly I am missing something - any help much appreciated.
Best Regards
picclock
Serial event not running
Re: Serial event not running
Right.
Serial event are not enabled by default, it requires to properly enable it using -DENABLE_HWSERIALx
See https://github.com/stm32duino/wiki/wiki ... wareserial
Serial event are not enabled by default, it requires to properly enable it using -DENABLE_HWSERIALx
See https://github.com/stm32duino/wiki/wiki ... wareserial
Re: Serial event not running
@fpiSTM
Thanks for the link, much appreciated. It will take me more than a minute or two to get around that.
From a quick scan this looks like the simplest option :
Serial.setRx(PA10); // using pin name
Serial.setTx(PA9);
Serial.begin(9600);
Just checked it out and it works a charm.
Definitely worth a virtual beer
.
Many Thanks
Best Regards
picclock
Thanks for the link, much appreciated. It will take me more than a minute or two to get around that.
From a quick scan this looks like the simplest option :
Serial.setRx(PA10); // using pin name
Serial.setTx(PA9);
Serial.begin(9600);
Just checked it out and it works a charm.
Definitely worth a virtual beer

Many Thanks
Best Regards
picclock