Files for pysimCoder on nucleo-h743zi2

This commit is contained in:
Roberto Bucher 2022-10-29 07:16:05 +02:00 committed by Alan Carvalho de Assis
parent 79f5906a7b
commit 944bb6164d
4 changed files with 18 additions and 10 deletions

View File

@ -1478,14 +1478,14 @@ static int adc_setup(struct adc_dev_s *dev)
leave_critical_section(flags);
ainfo("ISR: 0x%08" PRIx32 " CR: 0x%08" PRIx32 " \
CFGR: 0x%08" PRIx32 " CFGR2: 0x%08" PRIx32 "\n",
ainfo("ISR: 0x%08" PRIx32 " CR: 0x%08" PRIx32 " "
"CFGR: 0x%08" PRIx32 " CFGR2: 0x%08" PRIx32 "\n",
adc_getreg(priv, STM32_ADC_ISR_OFFSET),
adc_getreg(priv, STM32_ADC_CR_OFFSET),
adc_getreg(priv, STM32_ADC_CFGR_OFFSET),
adc_getreg(priv, STM32_ADC_CFGR2_OFFSET));
ainfo("SQR1: 0x%08" PRIx32 " SQR2: 0x%08" PRIx32 " \
SQR3: 0x%08" PRIx32 " SQR4: 0x%08" PRIx32 "\n",
ainfo("SQR1: 0x%08" PRIx32 " SQR2: 0x%08" PRIx32 " "
"SQR3: 0x%08" PRIx32 " SQR4: 0x%08" PRIx32 "\n",
adc_getreg(priv, STM32_ADC_SQR1_OFFSET),
adc_getreg(priv, STM32_ADC_SQR2_OFFSET),
adc_getreg(priv, STM32_ADC_SQR3_OFFSET),
@ -1856,8 +1856,8 @@ static int adc_interrupt(struct adc_dev_s *dev, uint32_t adcisr)
value = adc_getreg(priv, STM32_ADC_DR_OFFSET);
value &= ADC_DR_MASK;
awarn("WARNING: Analog Watchdog, Value (0x%03" PRIx32 ") \
out of range!\n", value);
awarn("WARNING: Analog Watchdog, Value (0x%03" PRIx32 ") "
"out of range!\n", value);
/* Stop ADC conversions to avoid continuous interrupts */

View File

@ -987,7 +987,7 @@ static int stm32_shutdown(struct qe_lowerhalf_s *lower)
putreg32(regval, regaddr);
leave_critical_section(flags);
sninfo("regaddr: %08" PRIx32 " resetbit: %08" PRIx32 "\n", \
sninfo("regaddr: %08" PRIx32 " resetbit: %08" PRIx32 "\n",
regaddr, resetbit);
stm32_dumpregs(priv, "After stop");

View File

@ -129,9 +129,9 @@
/* PWM */
#if defined(CONFIG_STM32H7_TIM1_PWM)
# define NUCLEOH743ZI2_PWMTIMER 1
# define NUCLEOH743ZI2_PWMTIMER 1
#else
# define NUCLEOH743ZI2_PWMTIMER 3
# define NUCLEOH743ZI2_PWMTIMER 3
#endif
/****************************************************************************
@ -217,6 +217,14 @@ int stm32_usbhost_initialize(void);
int stm32_pwm_setup(void);
#endif
/****************************************************************************
* Name: stm32_qencoder_initialize
*
* Description:
* Initialize and register a qencoder
*
****************************************************************************/
#ifdef CONFIG_SENSORS_QENCODER
int stm32_qencoder_initialize(const char *devpath, int timer);
#endif

View File

@ -74,7 +74,7 @@ int stm32_pwm_setup(void)
/* Get an instance of the PWM interface */
pwm = stm32_pwminitialize(NUCLEOH743ZI2_PWMTIMER);
if (!pwm)
if (pwm == NULL)
{
tmrerr("ERROR: Failed to get the STM32 PWM lower half\n");
return -ENODEV;