Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fwatch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
fwatch
Commits
368302bb
Commit
368302bb
authored
Jul 30, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clocking works (at least for GPIO)
parent
bb4ed5e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
main.c
sw/usbdcdc/src/main.c
+10
-10
No files found.
sw/usbdcdc/src/main.c
View file @
368302bb
...
...
@@ -146,29 +146,32 @@ int main(void)
// /* If first word of user data page is non-zero, enable eA Profiler trace */
// BSP_TraceProfilerSetup();
CMU_ClockSelectSet
(
cmuClock_HF
,
cmuSelect_HFXO
);
CMU_ClockEnable
(
cmuClock_HFPER
,
true
);
CMU_ClockEnable
(
cmuClock_GPIO
,
true
);
/* Setup SysTick Timer for 1 msec interrupts */
if
(
SysTick_Config
(
CMU_ClockFreqGet
(
cmuClock_CORE
)
/
1000
))
while
(
1
);
CMU_ClockSelectSet
(
cmuClock_HF
,
cmuSelect_HFXO
);
GPIO_PinModeSet
(
gpioPortE
,
11
,
gpioModePushPull
,
0
);;
GPIO_PinModeSet
(
gpioPortE
,
12
,
gpioModePushPull
,
1
);;
SerialPortInit
();
DmaSetup
();
USBD_Init
(
&
initstruct
);
GPIO_PinModeSet
(
gpioPortE
,
11
,
gpioModePushPull
,
0
);;
GPIO_PinModeSet
(
gpioPortE
,
12
,
gpioModePushPull
,
0
);;
/*
* When using a debugger it is practical to uncomment the following three
* lines to force host to re-enumerate the device.
*/
USBD_Disconnect
();
USBTIMER_DelayMs
(
1000
);
USBD_Connect
();
//
USBD_Disconnect();
//
USBTIMER_DelayMs(1000);
//
USBD_Connect();
for
(;;)
{
GPIO_PinOutToggle
(
gpioPortE
,
11
);
GPIO_PinOutToggle
(
gpioPortE
,
12
);
delay
(
1000
);
}
}
...
...
@@ -688,9 +691,6 @@ static void SerialPortInit(void)
LEUART_TypeDef
*
leuart
=
LEUART0
;
LEUART_Init_TypeDef
init
=
LEUART_INIT_DEFAULT
;
/* Configure GPIO pins */
CMU_ClockEnable
(
cmuClock_GPIO
,
true
);
/* To avoid false start, configure output as high */
GPIO_PinModeSet
(
gpioPortE
,
14
,
gpioModePushPull
,
1
);
GPIO_PinModeSet
(
gpioPortE
,
15
,
gpioModeInput
,
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment