cancel
Showing results for 
Search instead for 
Did you mean: 

Need help to understand Firmware UART_TwoBoards_ComDMA

julienterrier39
Associate II
Posted on August 07, 2015 at 18:35

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.     
16 REPLIES 16
julienterrier39
Associate II
Posted on August 22, 2015 at 19:21

Thanks for your answer,

I have the same ground because the power is supplied by the same PC in two different USB port but if GND from CN1 is different of GND from I/O peripheral?

But certainly you talk about GND from I/O peripheral so I should connect a wire between GND TRANSMITTER BOARD and GND RECEIVER BOARD?

Now about the switch! This warning is provide from the readme.txt:

Warning: As both boards do not behave same way, ''TRANSMITTER_BOARD'' switch 

compilation exists to determine either software is for 1st transmitter board or 

2nd receiver (then transmitter) board. In other words, 1st board has to be 

flashed with software compiled with switch enable, 2nd board has to be flashed 

with software compiled with switch disable.

The switch is maybe the BUTTON USER ?

Sorry maybe my question is a bit stupid but I am a beginner!

Thank you  for your patience!

Posted on August 23, 2015 at 06:47

No, I would expect a software switch (define) which determines how the software is built by the compiler. You should build and put the TX version on one board, and build the RX version for the other?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
julienterrier39
Associate II
Posted on August 23, 2015 at 14:44

Ok, I see, I have To delete the directive line 54 (#define TRANSMITTER_BOARD) when I will compile/load the RX version ?

julienterrier39
Associate II
Posted on August 28, 2015 at 18:14

Hello,

I am back, I am unable to make the program work !  I wonder if all operations have been respected? 

In first board TX version I flashed UART_TwoBoards_ComIT with the #define TRANSMITTER_BOARD and I flashed the second board RX version without this #define.

Then I connected two crossed wires  PA9 /PA10 TX version and PA10/PA9 Rx version 

To finish Both are supplied with two USB cables Type-A to Type-B

I push on TX version's user-button  but nothing is happening!

leds state:

LD1 and LD2 are red lighted 

On Tx version there is LD3 which is green lighted

Thanks for your help!

Posted on August 28, 2015 at 18:48

I can only help you with SPL code, you'll have to wade into the mire of HAL/Cube code yourself.

From a hardware perspective you should be able to configure USART1 PA9/PA10 and output a stream of data, or echo data received. You could wire this to a PC with a USB/CMOS serial dongle, or RS232 level converter. You could review the data bits on a scope, and confirm the symbol and timing details.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
julienterrier39
Associate II
Posted on August 28, 2015 at 20:03

Hi clive1,

thanks for your help, in september I should buy a Smartscope from labnation. It's an USB oscillo.

With it I should be able to recover a signal from TX version board as this I will see if my problem is hardware rather than software. 

julienterrier39
Associate II
Posted on September 05, 2015 at 00:18

Hi,

I saw, I have an ErrorCallback during my transmission, where can I find some information about this ErrorCallback thus I could troubleshooting my issue!

In other words, hence the problem can come when there is an ErrorCallback?

thank you.