Merged in jjlange/nuttx (pull request #957)
Only use PCLKSEL0 for ADC on LPC176x family. Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
parent
6e8b76c3ab
commit
bc38e98862
@ -213,10 +213,13 @@ static void adc_reset(FAR struct adc_dev_s *dev)
|
||||
|
||||
putreg32(ADC_CR_PDN, LPC17_40_ADC_CR);
|
||||
|
||||
/* PCLKSEL0 only exists in LPC176x family parts */
|
||||
#ifdef LPC176x
|
||||
regval = getreg32(LPC17_40_SYSCON_PCLKSEL0);
|
||||
regval &= ~SYSCON_PCLKSEL0_ADC_MASK;
|
||||
regval |= (SYSCON_PCLKSEL_CCLK8 << SYSCON_PCLKSEL0_ADC_SHIFT);
|
||||
putreg32(regval, LPC17_40_SYSCON_PCLKSEL0);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC17_40_ADC_BURSTMODE
|
||||
clkdiv = LPC17_40_CCLK / 3 / 65 / priv->sps;
|
||||
|
Loading…
Reference in New Issue
Block a user