cancel
Showing results for 
Search instead for 
Did you mean: 

Reading pin state with LabView

CGrov.1
Associate II

I'm using an STM32L476RG and making a LabView program to display sensor data. When a pin is set to HIGH I want to take a data sample and store it in an array in LabView. I am having trouble detecting the state of my 'sample' pin while continuously streaming data to LabView with a serial connection.

How do I read the state of a pin using LabView?

1 REPLY 1
Mohamed Aymen HZAMI
ST Employee

Hello,

  1. Make sure that your both configuration of the UART in STM32L4 and LabView are the same (you can use a terminal like Hercule to test if the STM32L4 send correct data or not before connected with LabView).
  2. To detect the Pin state you need to check the state of the ODR register(Out Put Data register) or use the HAL function "HAL_GPIO_ReadPin".

Best Reagrds,

Mohamed Aymen.