mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Fix an error in the last commit
This commit is contained in:
@@ -65,23 +65,23 @@
|
|||||||
|
|
||||||
void up_systemreset(void)
|
void up_systemreset(void)
|
||||||
{
|
{
|
||||||
uint32_t regval;
|
uint32_t rstcr;
|
||||||
#if defined(CONFIG_SAMV7_EXTRESET_ERST) && CONFIG_SAMV7_EXTRESET_ERST != 0
|
#if defined(CONFIG_SAMV7_EXTRESET_ERST) && CONFIG_SAMV7_EXTRESET_ERST != 0
|
||||||
uint32_t rstmr;
|
uint32_t rstmr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
regval = (RSTC_CR_PROCRST | RSTC_CR_KEY);
|
rstcr = (RSTC_CR_PROCRST | RSTC_CR_KEY);
|
||||||
|
|
||||||
#if defined(CONFIG_SAMV7_EXTRESET_ERST) && CONFIG_SAMV7_EXTRESET_ERST != 0
|
#if defined(CONFIG_SAMV7_EXTRESET_ERST) && CONFIG_SAMV7_EXTRESET_ERST != 0
|
||||||
regval |= RSTC_CR_EXTRST;
|
rstcr |= RSTC_CR_EXTRST;
|
||||||
|
|
||||||
rstmr = gettreg32(SAM_RSTC_MR);
|
rstmr = getreg32(SAM_RSTC_MR);
|
||||||
rstmr &= ~RSTC_MR_ERSTL_MASK;
|
rstmr &= ~RSTC_MR_ERSTL_MASK;
|
||||||
rstmr &= RSTC_MR_ERSTL(CONFIG_SAMV7_EXTRESET_ERST) | RSTC_MR_KEY;
|
rstmr &= RSTC_MR_ERSTL(CONFIG_SAMV7_EXTRESET_ERST) | RSTC_MR_KEY;
|
||||||
putreg32(regval, SAM_RSTC_MR);
|
putreg32(rstmr, SAM_RSTC_MR);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
putreg32(regval, SAM_RSTC_CR);
|
putreg32(rstcr, SAM_RSTC_CR);
|
||||||
|
|
||||||
/* Wait for the reset */
|
/* Wait for the reset */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user