Re: Problem with LPTIM on Zephyr

Raz <raziebe@...>

I tried to compile LPTIM in the kernel but Zephyr fails. 
Is there an example for LPTIM in an app ?

On Tue, Feb 16, 2021 at 12:30 PM Erwan Gouriou <erwan.gouriou@...> wrote:
Hi Raz,

Did you checked that the clocks are correctly enabled?
In any case, I'd suggest to minimize the use of Cube functions to the timer related functions.
Zephyr provides most of things you need for MSP and board init.


On Fri, 12 Feb 2021 at 14:59, Raz <raziebe@...> wrote:
I am trying to use the LPTIM for the nucleos 476  by integrating it from CUBE. I ported the code below to Zephyr:



  /* Initialize all configured peripherals */
  for (;i<2;i++) {
   * LSE Input freq is 32768 hz.
   *  32768/64 = 512hz
   * */
  int secs = 3;
  if (HAL_LPTIM_Counter_Start_IT(&hlptim1, 512* secs + 1) != HAL_OK) {
  while (1)
  /* USER C

However, the timer does not start. Anyone is familiar with this problem ?

Kind regards

Join to automatically receive all group messages.