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

comprehension question Timer

Hi,

maybe i have a silly question, but i didn't programm timers before. I know how they work. But how is it possible that there are only three Timers in the 51822 and so many parts of the programm part (PWM,BLE,GPIOTE...) which need a timer? How can i organize my timers?

and is it possible to run one timer and write a function like "get_actual_time" which gives me the time in the moment i call the function?

Best reagards, Nils :)

Parents
  • Hi Nils, (and Håkon)

    I agree about the documentation, especially about the GPIOTE, PPI, Tasks and Events is insufficient. The problem is that it is reference material only.

    The example code helps, but because of complexity, it is not clear what is specific to a function (such as PPI) and what is required because of the example application. No explanation of why functions are used the way they are is given in the examples.

    What is really needed is a tutorial document with a detailed discussion of how these things work, and how the resources should be used. The situation with the PPI is particularly bad, because I think it is unique to the nRF51 products.

    Another section in desperate need of an explanation and rationale is the WDT registers RR0..7.

    Hey, Håkon , if you guys want to write a tutorial on these functions, I would be delighted to proof read them from the point of view of an end user/developer.

Reply
  • Hi Nils, (and Håkon)

    I agree about the documentation, especially about the GPIOTE, PPI, Tasks and Events is insufficient. The problem is that it is reference material only.

    The example code helps, but because of complexity, it is not clear what is specific to a function (such as PPI) and what is required because of the example application. No explanation of why functions are used the way they are is given in the examples.

    What is really needed is a tutorial document with a detailed discussion of how these things work, and how the resources should be used. The situation with the PPI is particularly bad, because I think it is unique to the nRF51 products.

    Another section in desperate need of an explanation and rationale is the WDT registers RR0..7.

    Hey, Håkon , if you guys want to write a tutorial on these functions, I would be delighted to proof read them from the point of view of an end user/developer.

Children
  • Thanks for you feedback, Nils. We're always trying to improve. Having understandable and informative examples and documentation is considered important for us.

    That being said, there are fairly high-level descriptions of the PPI system and the different peripherals in the Reference Manual. Especially section 9.1 (Peripheral interface functional description) gives an overview of the peripherals and how PPI connects them. There's a functional description section for each peripheral in the reference manual. Snippet from WDT description (section 19.1.1): "[i]The watchdog has 8 separate reload request registers which shall be used to request the watchdog to reload its counter with the value specified in the CRV register. To reload the watchdog counter, the special value 0x6E524635 needs to be written to all enabled reload registers. One or more RR registers can be individually enabled via the RREN register[/i]"

  • Thanks for you feedback, Philip. We're always trying to improve. Having understandable and informative examples and documentation is considered important for us.

    That being said, there are fairly high-level descriptions of the PPI system and the different peripherals in the Reference Manual. Especially section 9.1 (Peripheral interface functional description) gives an overview of the peripherals and how PPI connects them. There's a functional description section for each peripheral in the reference manual. Snippet from WDT description (section 19.1.1): "[i]The watchdog has 8 separate reload request registers which shall be used to request the watchdog to reload its counter with the value specified in the CRV register. To reload the watchdog counter, the special value 0x6E524635 needs to be written to all enabled reload registers. One or more RR registers can be individually enabled via the RREN register[/i]"

Related