Arduino Nano 33BLE

Hello I am getting the error “No type named ‘SPISlave’ in namespace 'mbed’clang(typename_nested_not_found)” when trying to use the SPISlave class on the online Keil Studio. On MBed Studio I have copied and pasted the example SPISlave program found at “SPISlave - API references and tutorials | Mbed OS 6 Documentation” with the target “ARDUINO_NANO33BLE” but I get the error message in the compiler

Image: BUILD/ARDUINO_NANO33BLE/ARMC6\Nano_33_Peripheral.hex
Building project Nano_33_Peripheral (ARDUINO_NANO33BLE, ARMC6)
Scan: Nano_33_Peripheral
Compile [100.0%]: main.cpp
[Error] main.cpp@8,1: unknown type name ‘SPISlave’
[ERROR] .\main.cpp:8:1: error: unknown type name ‘SPISlave’
SPISlave device(P1_14, P1_13, P1_15, P1_12);
^
1 error generated.
Building project Nano_33_Peripheral (ARDUINO_NANO33BLE, ARMC6)
Scan: Nano_33_Peripheral
Compile [100.0%]: main.cpp
[Error] main.cpp@3,1: unknown type name ‘SPISlave’
[ERROR] .\main.cpp:3:1: error: unknown type name ‘SPISlave’
SPISlave device(D12, D11, D13, D10); // mosi, miso, sclk, ssel
^
1 error generated.

Does anyone know why I cannot use the SPISlave class on the Arduino nano 33 BLE?

Hi,

Does anyone know why I cannot use the SPISlave class on the Arduino nano 33 BLE?

Because the MCU_NRF52840 target (inherits ARDUINO_NANO33BLE) doesn’t support the SPISlave feature.