cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 USB Library - USB_DELAY from any source other than SysTick??

saimaddy123
Associate II
Posted on March 19, 2011 at 14:51

STM32 USB Library - USB_DELAY from any source other than SysTick??

1 REPLY 1
Posted on May 17, 2011 at 14:28

Couldn't you just spin on the core's DWT cycle counter?

CycleStart = *DWT_CYCCNT;

while((*DWT_CYCCNT - CycleStart) < DelayCycles);

[DEAD LINK /public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/ARM CortexM3 STM32/No definition for DWT in Core_cm3.h&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000626BE2B829C32145B9EB5739142DC17E&currentviews=158]See Here

I'd also recommend you initialize things, and get the clock frequencies once rather than reading them every time you want a delay.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..