Page 1 of 2

Serial1Event Not working

Posted: Mon Feb 07, 2022 11:48 pm
by imk
Hello,
Environment Win10, STM32F411 Black Pill, IDE 2 RC3 and IDE 1.8.16

Does Serial1event work please?
As i have just spent three hours at it, reading post, github etc and no way can i get it to work.
So just wondering has it not been implemented and i am wasting my time, or is there a working example please?
Code is below, using default pins PA9 and PA10 with wire link as loop back, send ok but no serial1event to trigger loop message send
Many thanks IMK

#include <arduino.h>
#include <stdlib.h>
#include <stdint.h>
#include <HardwareSerial.h>

int RxStringComplete = 0;

void setup()
{
Serial1.begin( 38400 );
Serial1.print( "Test" );
}

void loop()
{
if( RxStringComplete ) // See if we have received a message
{
delay( 100 );
Serial1.print( "REPLY" );
Serial1.println( );
RxStringComplete = 0;
}
delay(1);
}


void serial1Event()
{
RxStringComplete = 1;
}

Re: Serial1Event Not working

Posted: Tue Feb 08, 2022 4:46 am
by fpiSTM
Hi,

Which core you used?

Re: Serial1Event Not working

Posted: Tue Feb 08, 2022 8:47 am
by imk
Hello
Not sure what you mean by core?
But is STM32F411CE on Black Pill board.
Everything else from Arduino libraries seems to work, timer, PWM Digital Read/Write, Digital input interrupts.
But can't find the magic for Serial1Event, i know it must be in there but how to find it please?
IMK

Re: Serial1Event Not working

Posted: Tue Feb 08, 2022 9:50 am
by fpiSTM

Re: Serial1Event Not working

Posted: Tue Feb 08, 2022 10:07 am
by imk
Hello fpistm

So if i read the threads will it fix the problem, or is serial1Event nor implemented please?

Thanks imk

Re: Serial1Event Not working

Posted: Tue Feb 08, 2022 10:51 am
by fpiSTM
We need to know which core you used else we can't help you. STM32 core implement it but I don't know for for Rogers's core.

It is explained here for stm32 core: https://github.com/stm32duino/wiki/wiki ... wareserial

Re: Serial1Event Not working

Posted: Tue Feb 08, 2022 11:05 am
by imk
hello fpistm firstly many thanks for the reply.
However i am confused by what is meant by "core" is it the ST chip type or some software library.
The chip is STM32F411CE as for software libraries, I have no idea, i just click library manager and install stuff.
Again thanks for the help
imk

Re: Serial1Event Not working

Posted: Tue Feb 08, 2022 11:16 am
by fpiSTM
Read the links I provided above. You can't have installed a core using the library manager.

Re: Serial1Event Not working

Posted: Tue Feb 08, 2022 11:36 am
by imk
hello fpistm

I Arduino preferences i have:

https://adafruit.github.io/arduino-boar ... index.json
https://github.com/stm32duino/BoardMana ... index.json

Is this what you mean please.?
IMK

Re: Serial1Event Not working

Posted: Tue Feb 08, 2022 11:56 am
by fpiSTM
Yes, so you use the stm32core and serial event is implemented. Therefore read the wiki first and we could go forward.