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: mbedos-error
– 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