cancel
Showing results for 
Search instead for 
Did you mean: 

STM32-MAT release 4.3 USART3 Block and UF4VGTx_OneADC Example

florence
Associate II
Posted on July 29, 2016 at 18:58

Hi,

Has anyone worked with STM32-MAT release 4.3 on the ADC examples? Could anyone tell me how one can run this example and get the ADC reading via USART3 block back to simulink host PC?

I am not sure if this example is intended to run as PIL or External Mode, but both failed. If I just run this example, build model, and open the project via MDK IDE. I can compile and run this matlab generated firmware. I modified the project to give me a LED blink when the ADC reading is above a thresh hold I set, and it worked properly so I think ADC is reading functions properly, but I still don't know how to retrieve the precise ADC readout. 

The main issue is I need to retrieve the precise ADC voltage read out value from USART3 block, to the PC. There is no detail or instruction on how this could be done. 

has anyone play with this and could shed some light? Thank you!

Florence

1 REPLY 1
florence
Associate II
Posted on August 13, 2016 at 02:00

OK, I figured this out. The serial communication from host PC to display ADC reading from the USART port of the MCU can be done using terminal emulator program Putty, the key thing is to be sure configure to the correct COM port number and baud rate.

Alternatively, one can try in matlab using serial function block to log ADC reading

Hardware wise, one needs USB to UART interface devices and correct Rx Tx port connection to USART port pin out from MCU