Spark Logic

STM32-RFM69

kylix Sun Dec 03, 2017 7:55 pm

Hello!

I’m trying to use an RFM69HW module with the STM32F401RE board (the project is this: https://github.com/brainelectronics/RFM69-STM32). I’ve just updated the STM32 cores to the latest available version: 24.11.2017 (Arduino IDE v1.6.9) but I get this error while compiling:

Arduino: 1.6.9 (Windows 7), Board: "Nucleo-64, Nucleo F401RE, Mass Storage, Generic Serial, None, Smallest (-Os default)"

Build options changed, rebuilding all
In file included from C:\Users\Kylix\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2017.11.24\cores\arduino/stm32/PinNames.h:25:0,

from C:\Users\Kylix\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2017.11.24\cores\arduino/stm32/pinmap.h:22,

from C:\Users\Kylix\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2017.11.24\cores\arduino/stm32/PeripheralPins.h:34,

from C:\Users\Kylix\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2017.11.24\cores\arduino/pins_arduino.h:21,

from C:\Users\Kylix\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2017.11.24\variants\NUCLEO_F401RE\variant.h:26,

from C:\Users\Kylix\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2017.11.24\variants\NUCLEO_F401RE\variant.cpp:19:

C:\Users\Kylix\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2017.11.24\cores\arduino/stm32/PortNames.h:74:17: error: expected constructor, destructor, or type conversion before '(' token

_Static_assert (LastPort <= 0x0F, "PortName must be less than 16");

^

exit status 1
Error compiling for board Nucleo-64.

Replies

fpiSTM Wed Dec 13, 2017 9:09 pm

[kylix – Sun Dec 03, 2017 7:55 pm] –
I’ve just updated the STM32 cores to the latest available version: 24.11.2017 (Arduino IDE v1.6.9) but I get this error while compiling:

I assume you use the STM core and you use the Nucleo F401. PA3 is used for Serial RX (via STLINK) so avoid to use it for attach interrupt.

By default your example (ino) set irqnum to 3. Even if it is a wrong name as it should be irqpin for attachinterrupt (as Steve already said several time).
https://github.com/brainelectronics/RFM … 32.ino#L63

So attach interrupt is done on D3. For Nucleo F401, it is the PB3, //D3
So IRQ_PIN in the sketch should be set to PB3 instead of PA3.
https://github.com/brainelectronics/RFM … 32.ino#L29

I think you have a misalignment with the pin.

kylix Wed Dec 13, 2017 9:53 pm

Yes, I’ve just checked and I confirm that in “Boards manager” (Arduino IDE) I have “STM32 Cores by ST-Microelectronics” installed.

I’ll try to connect the IRQ PIN to PB3

THANKS!

PS: changed as it follows

#define IRQPIN PB3
RFM69STM32 radio(CSPIN, IRQPIN, true, 3); (true is needed for RFM69HW module)
attachInterrupt(_interruptPin, RFM69STM32::isr0, RISING);

kylix Sat Dec 23, 2017 11:26 am

Other suggestions?

Sign in to reply