SPISlave API not working on Nucleo F401 Board

I seem unable to create SPISlave on an F401 board. Working in Studio, and using either
SPISlave ser_port(D11,D12,D13,D10);
OR
SPISlave ser_port(SPI_MOSI,SPI_MISO,SPI_SCK,SPI_CS);

I get the error message below (or similar). The program still appears to download, but clearly port is not configured, with LED1 repeatedly flashing, though it’s not used in the program. I don’t believe that this is a new problem, as have seen it reported in another post/forum, but without resolution. Or am I missing the obvious somewhere? Grateful for thoughts leading to a resolution.

++ MbedOS Error Info ++
Error Status: 0x80010130 Code: 304 Module: 1
Error Message: pinmap not found for peripheral
Location: 0x80060FF
Error Value: 0x16
Current Thread: main Id: 0x20001A64 Entry: 0x8004F9D StackSize: 0x1000 StackMem: 0x200004C0 SP: 0x20001394
For more info, visit: mbedos-error

Hello,

the error pinmap not found for peripheral wants to inform you that you used the wrong pins. Only pins accoring to pinmap can be used.

SPI_CS = D10 = PB_6 and this pin is not in pinmap for SPI CS (SSEL)

BR, Jan

Thanks indeed for your swift response Jan, and useful points made. Even checking (again) the pinmap IDs did not seem to lead to success. However this post, which I hadn’t seen before, seemed finally to get me over the line: Nucleo STM32-F401RE as SPISlave - Question | Mbed

Best wishes, Tim

Hello,

ok, maybe it wasn’t obvious, but content in the topic says similar/same info what I wrote.
Pins D11, D12, D13 are pins of SPI1. Pin D10 is not listed as any SPI CS pin so it can not be used like that. You can use only A2 (PA_4) or PA_15, that are CS pins for SPI1.

BR, Jan