Serial1Event Not working

Post here first, or if you can't find a relevant section!
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Serial1Event Not working

Post 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;
}
1201 Alarm
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Serial1Event Not working

Post by fpiSTM »

Hi,

Which core you used?
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Re: Serial1Event Not working

Post 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
1201 Alarm
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Serial1Event Not working

Post by fpiSTM »

imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Re: Serial1Event Not working

Post by imk »

Hello fpistm

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

Thanks imk
1201 Alarm
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Serial1Event Not working

Post 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
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Re: Serial1Event Not working

Post 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
1201 Alarm
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Serial1Event Not working

Post by fpiSTM »

Read the links I provided above. You can't have installed a core using the library manager.
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Re: Serial1Event Not working

Post 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
1201 Alarm
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Serial1Event Not working

Post by fpiSTM »

Yes, so you use the stm32core and serial event is implemented. Therefore read the wiki first and we could go forward.
Post Reply

Return to “General discussion”