Using HAL API and Cube Mx code generator, only 5 lines in main.c and 2 lines in ISR are necessary for Tx and interrupts Rx for STM32f4 Discovery. The major issue is understanding the game of activating and deactivating the interrupts made by HAL instructions and macros. Here we use the blocking instructions (the Tx instruction is blocked by reception, as one may notice at the end). Anyway, we recommend the non-blocking method using the HALxxxIT instructions, as in the next video.
© Universitatea Hyperion 20
آی-ویدئو