Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

STM32 Serial Port Control with LabView

Status
Not open for further replies.

uranyumx

Advanced Member level 4
Joined
Mar 5, 2011
Messages
102
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,296
Activity points
2,095
Hello,

I have a customed designed PCB with an STM32F7 microprocessor. My target is that controlling this PCB with the LabView interface through Bluetooth communication. I did some initial design on Labview and write code in Keil.

In the attached example, there is a 2.5V constant signal which is generated by the PCB. it is converted into digital form with internal ADC of the processor. Now I expect to see this digitized signal on the interface.

Do you have any suggestions about seeing the signal properly on Labview?

Thank you,
 

Attachments

  • Block Diagram.PNG
    Block Diagram.PNG
    12 KB · Views: 336
  • Code 1.PNG
    Code 1.PNG
    11.7 KB · Views: 318
  • Code 2.PNG
    Code 2.PNG
    6.6 KB · Views: 289
  • Front Panel.PNG
    Front Panel.PNG
    19.2 KB · Views: 292

Hello,

I may come to close a little bit. I updated the block diagram (attached it). Now the LED is constantly ON no matter is 0 or 1. Do you have any suggestions to turn off the LED?

Thank you,
 

Attachments

  • Block Diagram.PNG
    Block Diagram.PNG
    18.2 KB · Views: 266
  • Front Panel.PNG
    Front Panel.PNG
    14.9 KB · Views: 239
  • Watch Window.PNG
    Watch Window.PNG
    16.4 KB · Views: 252
  • Code.PNG
    Code.PNG
    17.7 KB · Views: 251

Hi,

HAL_UART_TRANSMIT_DMA needs to be within the while(1) loop somehow. Else it can't send any data.
But you need to ensure that the previous array is already sent out.
I recommend to use two buffers alternatively.
Mind: the buffer when used in DMA is not copied befire sent out...so if you modify the buffer content during sending out you may transmit wrong data.

Klaus
 

Thank you @KlausST ! When I left from the debug mode on the Keil, It worked (the code what I posted in the second thread). In this application, when I press the right arrow on the keyboard, the LED is OFF. When I release the key, the LED is ON.

My next target is that typing some values on the LabView such as set a signal amplitude value, then expect to update in the Keil code and generate a signal what I set on the LabView. Currently, I used 'Keys Pressed' icon on the LabView. Do you have suggestion how I can update the block diagram to set values?
 

Use key press / control change events in LabView and send the data over UART only during the event.
Ideally you should put the whole VISA functionality into separate VI or class and talk to it with custom events or queues. If you don't do this you may experience freezing the screen or other bad effects
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top