This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What can I expect when I set the BITMODE register?

I know nrf51 timer0 can be configured for 16,8,24 and 32 bit modes and timer1 and timer2 can be configured for 16 and 8 bit modes.

But what can I expect the value to be when I select bitmode 32bits for timer2?

what I think is happening is that timer1 and 2 only check bit 0 of the BITMODE register and ignore bit 1?? When I set 32 bit mode (value 0x3) it will result in a 1 for bit 0. But a 1 for bit 0 equals to 8 bit mode.

Is this correct?

Parents
  • As far as I can see from a brief test: 1 = 8bit, while the rest is; 0 = 16 bit, 2 = 16 bit and 3 = 16 bit. I assume this is because only the number of bits indicated by the bitmode register will be used by the Timer (according to the spec). So the HW checks the bitmode register and finds out it can use 24bits or 32 bits from the CC register. However since it only supports 16 it will only use 16 bits instead of 24/32, aka the bitmode register is "used as a filter" when loading the CC value.

Reply
  • As far as I can see from a brief test: 1 = 8bit, while the rest is; 0 = 16 bit, 2 = 16 bit and 3 = 16 bit. I assume this is because only the number of bits indicated by the bitmode register will be used by the Timer (according to the spec). So the HW checks the bitmode register and finds out it can use 24bits or 32 bits from the CC register. However since it only supports 16 it will only use 16 bits instead of 24/32, aka the bitmode register is "used as a filter" when loading the CC value.

Children
No Data
Related