Skip to main content
aatif shaikh
Associate III
Nov 1, 2018 6:05 AM UTC
Solved

Can i use Standard peripheral library along with HAL library

hello!

as I want to implement TCP/IP and Fatfs based application I have to use HAL library which I'm not very comfortable with. so for other peripherals like USART, SPI and I2C i want to use STD peripheral library which is much easier to understand and implement. or anyone can suggest me an example or reference code using STD peripheral library with TCP/IP stack for stm3220xG eval board.

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Nov 3, 2018 1:37 PM UTC

This is an SDIO+FATFS example for the STM32F4-DISCO with STM32F4DIS-BB, a 2017 refresh of something I put together several years ago.

https://drive.google.com/open?id=0B7OY5pub_GfINVZnNXFvTGxaWmM

This is a damaged thread from one of the prior discussions

https://community.st.com/s/question/0D50X00009XkdmcSAB/stm32f4disbb-fatfs

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

8 replies

Jeroen3
Senior
Nov 1, 2018 6:47 PM UTC

I have tried. But they are not compatible. Can't even make it to compile.

They both try to define the same things, or different things in the same files. It's a mess.

Tesla DeLorean
Guru
Nov 1, 2018 7:40 PM UTC

Should be example for that board doing LwIP+Ethernet in SPL

https://www.st.com/en/embedded-software/stsw-stm32059.html

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
aatif shaikh
Associate III
Nov 2, 2018 4:22 AM UTC

thanks! it works perfectly fine..

do you know any link where I get some sample code related to Fatfs which uses STD library. cause all I'm getting HAL and STM32CubeMX examples. If available it will be a big help, if not! then I'll have to merge STD and HAL.

Tesla DeLorean
Guru
Nov 2, 2018 12:32 PM UTC

Should be SDIO examples in the SPL trees. Seem to recall some FATFS examples for the EVAL boards. I know I've posted numerous working FATFS examples over the years for F4 boards, the F2 and F4 designso are very similar. ​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
Nov 2, 2018 12:53 PM UTC

STM32F4xx_DSP_StdPeriph_Lib_V1.8.0\Utilities\STM32_EVAL\STM3240_41_G_EVAL\stm324xg_eval_sdio_sd.c

STM32F4xx_DSP_StdPeriph_Lib_V1.8.0\Project\STM32F4xx_StdPeriph_Examples\SDIO\SDIO_uSDCard

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
aatif shaikh
Associate III
Nov 3, 2018 10:08 AM UTC

the example code is very similar to STM32F2xx standard peripherals example of SDIO but I'm unable to find Fatfs example(File input/ output). As I'm not very familiar with SDIO and its working so i don't know how to use other "uSD card" libraries or functions.

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Nov 3, 2018 1:37 PM UTC

This is an SDIO+FATFS example for the STM32F4-DISCO with STM32F4DIS-BB, a 2017 refresh of something I put together several years ago.

https://drive.google.com/open?id=0B7OY5pub_GfINVZnNXFvTGxaWmM

This is a damaged thread from one of the prior discussions

https://community.st.com/s/question/0D50X00009XkdmcSAB/stm32f4disbb-fatfs

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..