Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int _adc_gpio_init(Stm32CurrentSenseParams* cs_params, const int pinA, const int
return 0;
}


#ifndef SIMPLEFOC_STM32_ADC_DISABLE_RC_FALLBACK
extern "C" {
void ADC1_2_IRQHandler(void)
{
Expand All @@ -207,5 +207,6 @@ extern "C" {
}
#endif
}
#endif

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ void* _driverSyncLowSide(void* _driver_params, void* _cs_params){
if(tim_interrupt) {
// error in the timer interrupt initialization
SIMPLEFOC_DEBUG("STM32-CS: timer has no repetition counter, ADC interrupt has to be used");
#ifdef SIMPLEFOC_STM32_ADC_DISABLE_RC_FALLBACK
SIMPLEFOC_DEBUG("STM32-CS: ERROR: Interrupts disabled!");
return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED;
#endif
}

// set the trigger output event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ int _adc_gpio_init(Stm32CurrentSenseParams* cs_params, const int pinA, const int
return 0;
}

#ifndef SIMPLEFOC_STM32_ADC_DISABLE_RC_FALLBACK
extern "C" {
void ADC_IRQHandler(void)
{
Expand All @@ -203,5 +204,5 @@ extern "C" {
}
}
}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ void* _driverSyncLowSide(void* _driver_params, void* _cs_params){
if(tim_interrupt) {
// error in the timer interrupt initialization
SIMPLEFOC_DEBUG("STM32-CS: timer has no repetition counter, ADC interrupt has to be used");
#ifdef SIMPLEFOC_STM32_ADC_DISABLE_RC_FALLBACK
SIMPLEFOC_DEBUG("STM32-CS: ERROR: Interrupts disabled!");
return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED;
#endif
}

// set the trigger output event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int _adc_gpio_init(Stm32CurrentSenseParams* cs_params, const int pinA, const int
return 0;
}


#ifndef SIMPLEFOC_STM32_ADC_DISABLE_RC_FALLBACK
extern "C" {
void ADC1_2_IRQHandler(void)
{
Expand Down Expand Up @@ -279,4 +279,5 @@ extern "C" {
}
#endif
}
#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ void* _driverSyncLowSide(void* _driver_params, void* _cs_params){
if(tim_interrupt) {
// error in the timer interrupt initialization
SIMPLEFOC_DEBUG("STM32-CS: timer has no repetition counter, ADC interrupt has to be used");
#ifdef SIMPLEFOC_STM32_ADC_DISABLE_RC_FALLBACK
SIMPLEFOC_DEBUG("STM32-CS: ERROR: Interrupts disabled!");
return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED;
#endif
}

// set the trigger output event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ int _adc_gpio_init(Stm32CurrentSenseParams* cs_params, const int pinA, const int
return 0;
}


#ifndef SIMPLEFOC_STM32_ADC_DISABLE_RC_FALLBACK
extern "C" {
void ADC_IRQHandler(void)
{
Expand All @@ -247,5 +247,6 @@ extern "C" {
}
}
#endif
#endif

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ void* _driverSyncLowSide(void* _driver_params, void* _cs_params){
if(tim_interrupt) {
// error in the timer interrupt initialization
SIMPLEFOC_DEBUG("STM32-CS: timer has no repetition counter, ADC interrupt has to be used");
#ifdef SIMPLEFOC_STM32_ADC_DISABLE_RC_FALLBACK
SIMPLEFOC_DEBUG("STM32-CS: ERROR: Interrupts disabled!");
return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED;
#endif
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ int _adc_gpio_init(Stm32CurrentSenseParams* cs_params, const int pinA, const int
return 0;
}

#ifndef SIMPLEFOC_STM32_ADC_DISABLE_RC_FALLBACK
extern "C" {
void ADC1_2_IRQHandler(void)
{
Expand Down Expand Up @@ -277,5 +278,6 @@ extern "C" {
}
#endif
}
#endif

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ void* _driverSyncLowSide(void* _driver_params, void* _cs_params){
if(tim_interrupt) {
// error in the timer interrupt initialization
SIMPLEFOC_DEBUG("STM32-CS: timer has no repetition counter, ADC interrupt has to be used");
#ifdef SIMPLEFOC_STM32_ADC_DISABLE_RC_FALLBACK
SIMPLEFOC_DEBUG("STM32-CS: ERROR: Interrupts disabled!");
return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED;
#endif
}


Expand Down
Loading