‎2021-11-05 02:05 PM
Hello! I am trying to get the USART1 (only using as a UART) for the STM32F411CE. I have been doing some studying on the STM32407VG and got the UART to work with straight register manipulation. (That was done here: https://community.st.com/s/question/0D53W000017PE8JSAW/why-does-the-debugger-not-respond-after-ue-bit-is-set-for-uart4)
But I figure I try to learn some HAL now and repeat the same exercises with a STM32 blackpill (STM32F411CE).
Here is my code:
https://github.com/BitBangGaming/Piggy-Pad-Firmware-Workspace/tree/main/N64_Piggy_Pad_Cable/Src
I did look around at some tutorials and I am not sure what I am missing! I am able to enter the main loop but it seems as though my function for transmitting times out and never gets a chance to send out an data.
Here is my wiring as well:
Any hints are greatly appreciated.
Note: The "main" and "comms_n64_console" modules are where you want to look. I tried my best to keep everything as modular as possible (and neat as possible!).
Thanks for reading!
Solved! Go to Solution.
‎2021-11-05 02:49 PM
Doesn't it have an 8 MHz crystal?
Nevermind, it doesn't
https://stm32-base.org/boards/STM32F411CEU6-WeAct-Black-Pill-V2.0.html
Do you have an stm32f4xx_it.c file with the interrupt handler for the SysTick?
Could you use a debugger and see where it's stuck perhaps? Or look at the RCC, GPIO and USART peripheral registers?
‎2021-11-05 02:49 PM
Doesn't it have an 8 MHz crystal?
Nevermind, it doesn't
https://stm32-base.org/boards/STM32F411CEU6-WeAct-Black-Pill-V2.0.html
Do you have an stm32f4xx_it.c file with the interrupt handler for the SysTick?
Could you use a debugger and see where it's stuck perhaps? Or look at the RCC, GPIO and USART peripheral registers?
‎2021-11-05 02:58 PM
Nah no debugger (coming soon). I do have a logic analyzer. Actually let me see if I can even toggle the GPIO on that pin to see if its something weird with my setup.
‎2021-11-05 03:24 PM
Welp, my logic analyzer has one of its channels not working correctly. Switched the channel over and it works if now. :expressionless_face:
Thanks for pointing in me the right direction. I need to remove SysTickHandler, totally forgot it was there.