Hi, I'm trying everything to get this project to work, but can't. I have tried moving library files and having tons of problems with Keil's linker, but I somehow (idk how atm) managed to compile everything smoothly. I'm trying to use the UART module of the STM32F401RET board to calibrate the limiting distance the sensor should set the alarm on. The sensor is working just fine with the example ST provided. I used the STM32CubeMX to make a UART example code for initialization, and followed a tutorial to make it work (it worked by itself) the thing is that when I try to merge them together (the sensor's code and the UART example) the UART transmision timeouts, and never sends anything through the UART module.
Anyone has any advice about this? I really need your help! Thank you for your time, Alan.
I've used the debugger, and that's how I know that the combined code is doing a timeout. It's weird because after debugging and comparing step by step, both of them start the same, but the merged one takes a different path after one cycle of the while loop waiting for the data to be sent. Since there isn't like an error or something, I really don't know where to go from here, since it just timeouts, and continues with the code.
Thanks!
output some diagnostic trace messages to a spare UART to see what's happening - both in the separate cases, and the combined code.
I just solved it, saw a post on another forum about a guy who had a somewhat similar problem that made me think on the libraries, and saw that 3 files weren't updated. I replaced them and it worked! For future reference, if someone stumbles upon this problem, the files were the following: stm32f4xx_it.c stm32f4xx_hal_msp.c system_stm32f4xx.c with their corresponding header files.
Thank you guys for the help!