Using RadioHead library for NUCLEO 32 board

Hello, i got some problem when using radiohead library from sparkfun and im using the example of RF22 code provided by the library. I got some error like THIS :

Arduino: 1.8.10 (Windows 10), Board: “Generic STM32F4 series, Black F407VE, STM32CubeProgrammer (SWD), Enabled (generic ‘Serial’), None, Low/Full Speed, Smallest (-Os default), Newlib Nano (default)”

C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RHHardwareSPI.cpp: In member function ‘virtual void RHHardwareSPI::begin()’:
C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RHHardwareSPI.cpp:104:39: error: invalid conversion from ‘uint8_t’ {aka ‘unsigned char’} to ‘BitOrder’ [-fpermissive]
104 | _settings = SPISettings(frequency, bitOrder, dataMode);
| ^~~~~~~~
| |
| uint8_t {aka unsigned char}
In file included from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master/RadioHead.h:1181,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master/RHGenericSPI.h:10,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master/RHHardwareSPI.h:10,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RHHardwareSPI.cpp:7:
C:\Users\teddy\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\libraries\SPI\src/SPI.h:72:42: note: initializing argument 2 of ‘SPISettings::SPISettings(uint32_t, BitOrder, uint8_t)’
72 | SPISettings(uint32_t clock, BitOrder bitOrder, uint8_t dataMode)
| ~^~
C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp: In member function ‘void RH_ASK::timerSetup()’:
C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp:332:5: error: ‘TCCR1A’ was not declared in this scope
332 | TCCR1A = 0; // Output Compare pins disconnected
| ^
~~~
C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp:333:5: error: ‘TCCR1B’ was not declared in this scope
333 | TCCR1B = _BV(WGM12); // Turn on CTC mode
| ^~~~~~
In file included from C:\Users\teddy\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/wiring.h:34,
from C:\Users\teddy\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/Arduino.h:32,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master/RadioHead.h:1174,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master/RHGenericDriver.h:9,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master/RH_ASK.h:9,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp:6:
C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp:333:18: error: ‘WGM12’ was not declared in this scope
333 | TCCR1B = _BV(WGM12); // Turn on CTC mode
| ^~~~~
C:\Users\teddy\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/wiring_constants.h:99:25: note: in definition of macro ‘_BV’
99 | #define _BV(bit) (1 << (bit))
| ^~~
C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp:340:5: error: ‘OCR1A’ was not declared in this scope
340 | OCR1A = nticks;
| ^~~~~
C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp:347:5: error: ‘TIMSK’ was not declared in this scope
347 | TIMSK |= _BV(OCIE1A);
| ^~~~~
In file included from C:\Users\teddy\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/wiring.h:34,
from C:\Users\teddy\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/Arduino.h:32,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master/RadioHead.h:1174,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master/RHGenericDriver.h:9,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master/RH_ASK.h:9,
from C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp:6:
C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp:347:18: error: ‘OCIE1A’ was not declared in this scope
347 | TIMSK |= _BV(OCIE1A);
| ^~~~~~
C:\Users\teddy\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/wiring_constants.h:99:25: note: in definition of macro ‘_BV’
99 | #define _BV(bit) (1 << (bit))
| ^~~
C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp: At global scope:
C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master\RH_ASK.cpp:636:4: error: expected constructor, destructor, or type conversion before ‘(’ token
636 | ISR(RH_ASK_TIMER_VECTOR)
| ^
Multiple libraries were found for “RH_RF22.h”
Used: C:\Users\teddy\Documents\Arduino\libraries\RadioHead-master
Multiple libraries were found for “SPI.h”
Used: C:\Users\teddy\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\libraries\SPI
Multiple libraries were found for “SrcWrapper.h”
Used: C:\Users\teddy\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\libraries\SrcWrapper
exit status 1
Error compiling for board Generic STM32F4 series.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Anyone have some solution for it ???

#include <RH_RF22.h>
#include <SPI.h>

// Singleton instance of the radio
RH_RF22 rf22;

void setup()
{
  Serial.begin(9600);
  if (!rf22.init())
    Serial.println("RF22 init failed");
  // Defaults after init are 434.0MHz, 0.05MHz AFC pull-in, modulation FSK_Rb2_4Fd36
}

void loop()
{
  while (1)
  {
    rf22.waitAvailable();

    // Should be a message for us now
    uint8_t buf[RH_RF22_MAX_MESSAGE_LEN];
    uint8_t len = sizeof(buf);
    if (rf22.recv(buf, &len))
    {
      Serial.print("got request: ");
      Serial.println((char*)buf);

      // Send a reply
      //uint8_t data[] = "And hello back to you";
      //rf22.send(data, sizeof(data));
      //rf22.waitPacketSent();
      //Serial.println("Sent a reply");
    }
    else
    {
      Serial.println("recv failed");
    }
  }
}