2015-08-07 09:35 AM
Hello everybody,
I want create a project wich work with USART, I use as IDE Keil µvision5 (light version) then I bought a STM32F429ZI-DISCOVERY board to train with it. Currently I trying to understand how does it work, indeed I saw that I need two boards for the program to work.Actually I trying to understand ''UART_TwoBoards_ComDMA'' project. In the packages, I have three example wich use the USART protocol:-UART_TwoBoards_ComDMA--UART_TwoBoards_ComIT--UART_TwoBoards_ComPolling-To lead my project with success I need someone who has a knowledge on the µcontroller such as STM32F4 and who can help me througout this forum.Of course I have started to read the relevant datasheet such as STM32F4 ref manual and STM32F429ZIT to learn the register and how does it work.But as I am beginner in embedded firmware its very hard to undestand everything.My first question will be:What is the significant difference between this 3 examples (DMA, INTERRUPT and POLLING) ?I saw that the DMA is used as internal data bus ? and I know that the interrupt for example it make with a timer.I hope that my post is clear but I am french and beginner.Thank you so much.2015-08-10 03:23 AM
Hi,
[…I have started to read the relevant datasheet such as STM32F4 ref manual and STM32F429ZIT …], you should know that there is a difference between datasheet and reference manual.I suggest you to read the readme file that describes every example. Also the differences between UART transmission modes are described in the section Universal synchronous asynchronous receiver transmitter (USART), in thehttp://www.st.com/web/en/resource/technical/document/reference_manual/DM00031020.pdf
Reference manual.-Syrine-2015-08-10 07:47 AM
2015-08-11 03:34 AM
Hi julien.terrier,
I read again readme.txt between DMA method and interrupt method and sincerely, I have found nothing that would help me understand the differences there are between these methods.So it would be helpful for you to have a look to AN and user manuals available in
http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1897/PF259243
(mainly AN4739, UM1725 and UM1730).-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2015-08-11 05:17 AM
Julien,
First try to write a first UART project (in polling mode) without DMA and Interrupt. Start with this project : C:\Users\username\STM32Cube\Repository\STM32Cube_FW_F4_V1.7.0\Projects\STM32F429I-Discovery\Examples\UART\UART_TwoBoards_ComPolling Polling method means during transmit or receive sequence, your code must wait for UART Data Register Receive Not Empty or Transmit Empty Flag synchronization. That include latency and it's not used for realtime communication (depending application) let me know.To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2015-08-11 05:53 AM
Hi,
Polling/IT/DMA modes are not UART specific, it is valid for all peripheral with communication.Polling : no concurrent calls / function calls are blocking mode (you call function to transfer 20 bytes, you will exit function only at the end (when all bytes are transmitted =>it is not possible to execute other code during this transmission.) So polling mode should be used only when this constraint is not a problemDMA and IT mode are more flexible, and between transfer start and end (user callback is called), other code could be executed ... globally, IT and DMA modes are more efficient.-Syrine-2015-08-11 09:27 AM
What is the significant difference between this 3 examples (DMA, INTERRUPT and POLLING) ?
It's to demonstrate various methods people are used to using. May be you should be reviewing this in a Computer Architecture and Computer Science sense, the STM32 is only one part in a large galaxy of micro-processors/controllers. Generally the reasons to use DMA or Interrupts is so the processor can go about doing useful work instead of grinding in a loop waiting for some slow interface to respond or for a user to depress a key.2015-08-11 08:36 PM
Thanks a lot everybody for your answers, I understood well that with DMA or interrupt methods the processor could work more easily without latency therefore it will work in multi-tasking and my choice will depend of my application and my needs.
However I am going read all related documents that you suggest me. I bought a second board to compile these three methods and above all I stay close of you for any questions!2015-08-22 08:02 AM
Hello everybody,
I purchased a second discovery-board STM32F429ZI to try UART_TwoBoards_ComIT program but I didn't get anything.In first I made the connection between two boards through PA09Tx (Tx Bd) to PA10Rx (Rx Bd) and PA10Rx (Tx Bd) to PA09Tx (Rx Bd).Then according to the warning in readme.txt: I should remove a switch on the receiver board, but which switch CN4(x2)? and during any operation should I move out this switch ? Compilation, Loading in flash memory ?For your information both are supplied throughout USB port, and if I move out CN4 switchs The ST-link is not recognized!Thank you for your help!2015-08-22 08:52 AM
PA9, and PA10 should be usable on the STM32F429I-DISCO. Make sure you bond the ground between the two boards.
Shouldn't require you to change any links or jumpers.