2017-06-14 06:14 AM
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()?
2017-06-15 08:10 AM
Debugging the hardware, I have seen that after executing the execution of 'for' loop into callback function, the 'for' loop runs again.
It seems like that the interruption happened again.
But I watch on the oscilloscope that the DATAin line has not gone down (then, none interruption should happen)
DATAin line is use to interrupt the micro (first DATAin goes down, then DATAin delivers 24 data bits every clock pulse)
2017-06-15 08:15 AM
I think I should disable the interruption once it has begun and after exiting, to enable it again
2017-06-15 08:15 AM
Sorry:
I think I should disable the interruption once it has begun and BEFORE exiting, to enable it again