cancel
Showing results for 
Search instead for 
Did you mean: 

Adding UART, SPI port to EEPROM Emulation example

Luis Ornelas
Associate
Posted on October 27, 2017 at 17:48

Hi, I have two projects. One with all the features I want to have: UART, SPI and other protocols to initialize the LCD; it was built with STM32 CUBE MX. The other project is the EEPROM Emulation modified to read some values after power on. Both are working, I want to join both to build just one project. The problem Im facing is, I tried to configure all the peripherals, the code compiles but the board doesn't do anything else but only the eeprom emulation feature. Do you know what I can be missing? 

#stm32-mat #stm32f4-discovery
3 REPLIES 3
Posted on October 27, 2017 at 18:12

>>

Do you know what I can be missing? 

Most likely pin configuration or clock configuration, CubeMX tends to hide/obfuscate this stuff

Watch also for linker scripts and carving space for the EEPROM emulation out of the FLASH load region.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 23, 2018 at 17:14

I have exactly the same problem with SensorDemo from the STM32CubeExpansion_BLE1. I try to add the UART and I2C to this demo but with no result.

In which files can I check the Pin configuration and clock configuration ?

Thanks.

Posted on February 23, 2018 at 17:36

These things are spread all over the place in examples, look in

main.h

main.c

stm32Xxxx_hal_msp.c

stm32Xxxx_hal_conf.h

C/C++ command line defines

Search (find-in-files, grep, IDE based source browsing) for HAL_XXX_MspInit() functions supporting peripherals on your board, BSP_XXX_Init() functions.

SystemClock_Config()

HAL_Init()

HAL_MspInit()

etc

When learning a new platform, third party code or porting, use Static Analysis tools like Understand(tm) 

https://scitools.com/

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