AnsweredAssumed Answered

How to pass a variable read in an interruption to main()

Question asked by AME on Jun 14, 2017
Latest reply on Jun 15, 2017 by AME

I'm reading a serial ADC from an interruption (24 bits)

I need to pass its read value to the main()

I have defined in /* USER CODE BEGIN PV */ a volatile variable uint32_t  xxxxx

The xxxxx variable is right inside the interruption routine but it becomes 0x01FFFFFE when called in main()

How can I pass the xxxxx variable from       void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)     to      main()?

Outcomes