Why TIM1_DMAR Register is always default as 1?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-12 4:26 AM
I am using STM32F103 and its Referrence Manual(RM0008) said that TIM1_DMAR's default value is 0.
BUT when I connected the hardware and debugging with JLink, I found that TIM1_DMAR is always 1. And I never set it.AND if I reset TIM1_DMAR to 0 at a breakpoint, then Timer1completely stops running
. What's wrong with it?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-12 4:51 AM
What's wrong with it?
Hard to say, remove the debugger from the equation and output via the serial port. printf(''%04X\n'', TIM1->DMAR);Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-12 6:15 AM
Haha, I understand you~
It must be printed as 0, am I right? :D- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-12 6:40 AM
If it is zero it would tend to discount your previous observations.
I don't have an F103 to hand to evaluate.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-13 11:15 AM
If I understand correctly TIM1_DMAR is not a real register, it just redirects to real TIM registers according to TIM1_DCR.
So by default it would be mapped to CR1.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-14 2:40 AM
Thanks so much. I got it.
I think that STM32F103's Referrence Manual is too brief.. I read it more than twice and still didn't know how to use it...