SPI1.transfer(tx_buffer, rx_buffer, sizeof(rx_buffer), NULL) and SPI2.transfer(tx_buffer, rx_buffer, sizeof(rx_buffer), NULL); gives me hardware error. Led on eletron starts blinking red. my hardware connection are to SPI2 on electron, so i cannot check communication with SPI.transfer() but when i used SPI.transfer() in code, it didnt give me hardfault.
You may state the system version you’ve got on your device and you are targeting.
firmware version : firmware-release-v0.5.0
Target : electron board for SPI2 and P1 for SPI
The current version is 0.6.2 and with older versions there were some issues SPIx interfaces.
Thank you, I am going to try with latest version, will get back to you soon with result!
So, I updated v0.6.2 on the electron and it stopped giving me hard fault, but it still doesnt receive any data. it’s printing now nothing on serial port. electron is slave and P1 is master, P1 is still on v0.5.0 and is using SPI.transfer(). Is this okay to use them on different versions? or what else could be the reason that i am getting nothing on serial port for electron.
I am using this code: SPI2.transfer(tx_buffer, rx_buffer, sizeof(rx_buffer), NULL); gives me hardware error
this is what i am getting on putty
So it worked, i had to change mode from 0 to 2.