class Hareware SPI problems!! Please help

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
41300895
Posts: 28
Joined: Tue Oct 25, 2016 12:19 pm

class Hareware SPI problems!! Please help

Postby 41300895 » Mon Nov 14, 2016 11:22 am

I got this error while trying using SPI.h for some applications require SPI communication with STM32F4 discovery board:

Code: Select all

Arduino: 1.6.12 (Windows 10), Board: "STM32 Discovery F407"

..Documents\Arduino\hardware\Arduino_STM32-7985f25fbcb06f7a38f55d84cdf4b0b58e72da11\STM32F4\libraries\RF24_STM32\STM32-nRF24L01_Sensor_RX\STM32-nRF24L01_Sensor_RX.ino: In function 'void setup()':

STM32-nRF24L01_Sensor_RX:36: error: 'class HardwareSPI' has no member named 'setDataMode'

   SPI.setDataMode(SPI_MODE0);

       ^

STM32-nRF24L01_Sensor_RX:37: error: 'class HardwareSPI' has no member named 'setBitOrder'

   SPI.setBitOrder(MSBFIRST);

       ^
exit status 1
'class HardwareSPI' has no member named 'setDataMode'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I stored folders named: SPI , RF24_STM32 in the same directory: ..Documents\Arduino\hardware\Arduino_STM32-7985f25fbcb06f7a38f55d84cdf4b0b58e72da11\STM32F4\libraries\
But still don't know how to fix this problem, please help me

zmemw16
Posts: 1099
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: class Hareware SPI problems!! Please help

Postby zmemw16 » Mon Nov 14, 2016 12:06 pm

class HardwareSPI' has no member named 'setDataMode'

'class HardwareSPI' has no member named 'setBitOrder'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


the first two give it away.
look at the function declarations in the .h file
those functions don't exist, but they seem to be arguments in the begin call.

stephen
ps i used to love xtgold, now its midnight commander

stevestrong
Posts: 1019
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: class Hareware SPI problems!! Please help

Postby stevestrong » Mon Nov 14, 2016 12:12 pm

One way to get rid of the error messages is to update the SPI related files from F1 to F4 directory.
However, I don't know whether it will compile and work or not, I did not tried the F1 - SPI sources on F4 yet.


Return to “STM32F4 Boards”

Who is online

Users browsing this forum: No registered users and 1 guest