在线时间2221 小时
UID3253523
注册时间2016-3-21
NXP金币2872
该用户从未签到
超级版主
 
- 积分
- 24882
- 最后登录
- 2025-7-20
|
发表于 2016-9-7 10:20:58
|
显示全部楼层
我代码修改的地方如下,是能正常下载的,我测试时使用的工程是periph_blinky
- /* Sets up system pin muxing */
- void Board_SetupMuxing(void)
- {
- /* Enable IOCON and Switch Matrix clocks */
- Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_IOCON);
- Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SWM);
- //#if 0 /* Disabled external oscillator support for MAX812 board */
-
- #if 1 /* Disabled external oscillator support for MAX812 board */
- /* Use Switch Matrix Tool swm.c file for the Pin Enable 0 variable */
- LPC_SWM->PINENABLE0 = 0xffffff82UL; /* XTALIN + XTALOUT + CLKOUT on PIO0_1 + ACMP_I1 */
- /* Configure the pins for XTALIN/XTALOUT. */
- LPC_IOCON->PIO0[IOCON_PIO8] &= ~(3 << 3);
- LPC_IOCON->PIO0[IOCON_PIO9] &= ~(3 << 3);
- #else
- /* Use Switch Matrix Tool swm.c file for the Pin Enable 0 variable */
- LPC_SWM->PINENABLE0 = 0xffffffb2UL; /* IRC + CLKOUT on PIO0_1 + ACMP_I1 */
- #endif
- /* Assign the CLKOUT function to a pin */
- LPC_SWM->PINASSIGN[8] &= ~(0xFE << 16); /* bits 23:16 = PIN0_x := 1 in this case */
- /* Configure the pin for CLKOUT on PIO0_1 */
- LPC_IOCON->PIO0[IOCON_PIO1] &= ~(3 << 3);
- /* Disable the clock to the Switch Matrix to save power */
- Chip_Clock_DisablePeriphClock(SYSCTL_CLOCK_SWM);
- }
- /* Set up and initialize clocking prior to call to main */
- void Board_SetupClocking(void)
- {
- Chip_SetupXtalClocking();
-
- //Chip_SetupIrcClocking();
- /* Select the CLKOUT clocking source */
- Chip_Clock_SetCLKOUTSource(SYSCTL_CLKOUTSRC_MAINSYSCLK, 1);
- }
- /* Set up and initialize hardware prior to call to main */
- void Board_SystemInit(void)
- {
- /* Setup system clocking and muxing */
- Board_SetupMuxing();
- Board_SetupClocking();
- /* IOCON clock left on, but may be turned off if no other IOCON
- changes are needed */
- }
复制代码
|
|