Hardware SPI issues: Marlin firmware

Discussion about libraries written for the STM official Arduino core
Post Reply
youprint
Posts: 12
Joined: Mon Jan 22, 2018 10:57 pm
Location: Lyon France

Hardware SPI issues: Marlin firmware

Post by youprint » Sun Feb 04, 2018 7:30 pm

I'm trying to compile Marlin firmware on a STM32F103RET6 using Arduino 1.8.5 and STM32duino bootloader
https://github.com/MarlinFirmware/Marli ... gfix-2.0.x
i ve an issue with the spi hardware arduino says :

Code: Select all

sketch\src\HAL\HAL_STM32F1\HAL_spi_Stm32f1.cpp: In function 'void spiBeginTransaction(uint32_t, uint8_t, uint8_t)':
sketch\src\HAL\HAL_STM32F1\HAL_spi_Stm32f1.cpp:169:55: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'BitOrder' [-fpermissive]

   spiConfig = SPISettings(spiClock, bitOrder, dataMode);

 In file included from sketch\src\HAL\HAL_STM32F1\HAL_spi_Stm32f1.cpp:40:0:
C:\Users\Younes\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2018.2.2\libraries\SPI\src/SPI.h:111:2: error:   initializing argument 2 of 'SPISettings::SPISettings(uint32_t, BitOrder, uint8_t)' [-fpermissive]
  SPISettings(uint32_t clock, BitOrder bitOrder, uint8_t dataMode) {
exit status 1

The code is here :

https://github.com/MarlinFirmware/Marli ... tm32f1.cpp

Thanks

victor_pv
Posts: 1860
Joined: Mon Apr 27, 2015 12:12 pm

Re: Hardware SPI issues

Post by victor_pv » Sun Feb 04, 2018 8:17 pm

Someone else did that modification to the stm32 HAL.
You may get a faster reply if would be better if you post that comment in the commit in question in github and reference him, so when he logs in to github he sees the comment.

youprint
Posts: 12
Joined: Mon Jan 22, 2018 10:57 pm
Location: Lyon France

Re: Hardware SPI issues

Post by youprint » Mon Feb 05, 2018 12:54 am

Thanks victor for your fast reply. I saw that, it’s not exactly your original code, someone implemented the fonction in AVR on January 9th and he tried to do the same for the STM32 Hal but without testing it. Now we know that it don’t work properly and I m searching the good syntax now to get the code working.

Post Reply