From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Cortex GNAT RTS: BBC micro:bit tick rate Date: Tue, 24 Jul 2018 12:44:18 +0100 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="f1a471b2dc210712751fc31996c3fbea"; logging-data="29627"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//hLCVloNJio5/dL3VEnZsyyQZD5/PZHQ=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:NzyPGTrMxazPN6sMvXQTXA/0pKk= sha1:j3SkjOXvOSlPlW3ZsAnbM2xvt70= Xref: reader02.eternal-september.org comp.lang.ada:53952 Date: 2018-07-24T12:44:18+01:00 List-Id: As announced recently, Cortex GNAT RTS now supports the BBC micro:bit. Because the nRF51822 MCU doesn't support SysTick, it has to be simulated using the RTC peripheral, which runs at 32,768 Hz. At first I thought it wouldn't generate interrupts faster than 100 Hz anyway, but this turns out to be because I was disabling/enabling interrupts every time. It will go much faster than that (I don't know how much time is left for the CPU to do anything else, though). So, the question: is there any problem with having Ada.Real_Time.Tick be 1/1024 second? (with GNAT, it's usually/always a decimal fraction).