Hi everyone!
I am trying to send some HEX data to a printer module using STM32F4 Discovery board, UART. in cubeMX I defined some pins as TX, RX and CK. when I generate the code, I can not see any sign of these pin!!! why?
also when I use function HAL_UART_Transmit(), does it send data to TX pin?
thanks everyone!
Ala said:why?
why?
Clearly, you've done something (or some things) wrong!
But, as we have absolutely no idea at all what you have done - it is impossible to say anything more definite!
Note that none of this has anything specifically to do with Keil or ARM - you need to be looking at the ST documentation, examples, etc; and going to ST for support with the details of using their chips and their HAL.
https://www.st.com/en/evaluation-tools/stm32f4discovery.html
https://www.st.com/en/microcontrollers-microprocessors/stm32f407vg.html
https://www.st.com/content/st_com/en/support/learning/stm32-education.html
https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-online-training.html
https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-step-by-step.html
https://community.st.com/s/
To understand what "belongs" to ARM, and what is manufacturer-specific, see:
https://community.arm.com/developer/tools-software/tools/f/keil-forum/43684/lpc2148-timer0-not-working-as-expected/158950#158950
Dear Andy
thanks for your answer
I figured out that GPIO pins are configured in a file called stm32f4xx_hal_msp.c . but dear Andy, the main questions remains: does HAL_UART_Transmit(), sends data to the defined Tx pin?
Again, that has nothing to do with Keil!
The HAL is ST software - not Keil's; not ARM's.
What does the documentation tell you?
If ST's documentation is unclear, you need to ask ST for clarification!
The function feeds the data to the USART transmit register. If the clocks on the USART and the pin are enabled, and the correct Alternate Function (AF) mapping is selected, then the data will be shifted out the USARTx_TX pin you have associated with the peripheral.
Everything in the chain needs to have been configured/set correctly, otherwise none of it will work as expected.
Describing what you have done from a top level narrative is not nearly as useful as seeing the code that has set up the plumbing, and if that matches with your intent/expectations.
Play the ball from where it lies...
We seem to have a golf ball in the football field.
I think it would be better returned to the golf course ...
Most everyone has a less rigid understanding of the game space