Arm Mbed OS support forum

"MbedOS Error Info: pinmap not found for peripheral" when using SPI communication between two boards

Hello,
I’m trying to make two boards (NUCLEO-F746ZG and NUCLEO-F103RB) to communicate with each other using SPI. However, my slave code does not seem to work on neither of the boards. I checked the master code using a logic analyzer and it is working as it should, so something’s wrong with the slave code. In the case below, F1 is master and F7 is slave.

This is the error message I get:

++ MbedOS Error Info ++
Error Status: 0x80010130 Code: 304 Module: 1
Error Message: pinmap not found for peripheral
Location: 0x800AC87
Error Value: 0x6
Current Thread: main Id: 0x20005AA0 Entry: 0x8009811 StackSize: 0x1000 StackMem: 0x20004450 SP: 0x20005328
For more info, visit: https://mbed.com/s/error?error=0x80010130&tgt=NUCLEO_F746ZG
– MbedOS Error Info –

= System will be rebooted due to a fatal error =
= Reboot count(=8) reached maximum, system will halt after rebooting =

Here’s the master code:

#include “mbed.h”
#include <SPI.h>
#include “stdio.h”

SPI spi(PA_7,PA_6,PA_5);
DigitalOut cs(PB_6);

int main()
{
cs = 1;
spi.format(8,0);
spi.frequency(1000000);
cs = 0;
spi.write(0x69);
}

And here’s the slave code:

#include “mbed.h”
#include <SPI.h>
#include <SPISlave.h>
#include “stdio.h”

SPISlave spi(PA_7, PA_6, PA_5, PD_14);
BufferedSerial pc(USBTX, USBRX);

int main()
{
pc.set_baud(115200);
pc.set_format(8,BufferedSerial::None,1);
while (true) {
if (spi.receive()) {
printf(“hello”);
}
}
}

Any ideas on how to fix this?

Thanks,
Miko

Hello,

when you check board’s page there is a section called Pins Legend

legend

One of your pin with the mask PA_7 is marked with that…

pins

And when we follow instructions from first picture, then we open this page .

// Connected to RMII_CRS_DV [LAN8742A-CZ-TR_CRS_DV]

That tell us, the pin is already is occupied by the onboard ethernet solution.

So try to change it to different SPI interface, different pins.

BR, Jan

1 Like

Thank you Jan!
It is now working :smile:

//Miko