Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi,
I write a function, content is :
printf("%x %x %x %x %x %x %x %x\n\r", LPC_IOCON->PIO1_20, LPC_IOCON->PIO1_21, LPC_IOCON->PIO1_22, LPC_SYSCON->SYSAHBCLKCTRL, LPC_SYSCON->SSP1CLKDIV, LPC_SYSCON->PRESETCTRL, LPC_SSP1->CR0, LPC_SSP1->CR1); LPC_IOCON->PIO1_20 |= 0x2; LPC_IOCON->PIO1_21 |= 0x2; LPC_IOCON->PIO1_22 |= 0x2; LPC_SYSCON->SYSAHBCLKCTRL |= 0x400; LPC_SYSCON->SSP1CLKDIV = 2; LPC_SYSCON->PRESETCTRL |= 0x4; LPC_SSP1->CR0 |= 0xc7; LPC_SSP1->CR1 |= 0x2; printf("%x %x %x %x %x %x %x %x\n\r", LPC_IOCON->PIO1_20, LPC_IOCON->PIO1_21, LPC_IOCON->PIO1_22, LPC_SYSCON->SYSAHBCLKCTRL, LPC_SYSCON->SSP1CLKDIV, LPC_SYSCON->PRESETCTRL, LPC_SSP1->CR0, LPC_SSP1->CR1);The result is:
I follow the procedure in the User Manual, but CR0 and CR2 can not write.
Why?
Thank you,
Cid