add calculations of T & P by ADC; Release mode still have problems

This commit is contained in:
Edward Emelianov
2023-05-15 22:58:39 +03:00
parent a67da85f55
commit 54155fdca9
10 changed files with 127 additions and 24 deletions

View File

@@ -108,7 +108,7 @@ TRUE_INLINE void pwm_setup(){
}
#ifndef EBUG
TRUE_INLINE void iwdg_setup(){
void iwdg_setup(){
uint32_t tmout = 16000000;
/* Enable the peripheral clock RTC */
/* (1) Enable the LSI (40kHz) */
@@ -135,11 +135,10 @@ TRUE_INLINE void iwdg_setup(){
void hw_setup(){
RCC->AHBENR |= RCC_AHBENR_DMA1EN | RCC_AHBENR_DMA2EN;
gpio_setup();
IWDG->KR = IWDG_REFRESH;
i2c_setup(HIGH_SPEED);
IWDG->KR = IWDG_REFRESH;
pwm_setup();
#ifndef EBUG
iwdg_setup();
#endif
}
void setPWM(int nch, uint16_t val){