Open rusefillc opened 2 years ago
See https://rusefi.com/forum/viewtopic.php?p=44933#p44933 compatibility sumup between GD32 and STM32_V2.0.pdf
ADC Sampling settings describe ADC start-up resolvent There are three aspects
When ADON=0 Write on 1 after , Need to wait for a while t_WAIT, If you use ST Ku's words It's just ADC_CMD Back plus 20us Left and right delay .
If interrupt is used to obtain sampling data , Need software to clear interrupts .
Kind of relevant https://github.com/rusefi/rusefi-hardware/issues/127
See https://github.com/rusefi/ChibiOS/commit/0ce1cbd649f4bb2d9db941e729d3308b247b8696 for real stm32 check
GD32 ADC start-up has a specific timing requirment which ChibiOS does not fulfil
At the moment our work around is to set opimization level to none
we shall hack ChibOS maybe even by adding "isGd32 judging by newer ARM kernel version" runtime check