Search found 7 matches

by hamady91
Tue Oct 18, 2022 7:23 pm
Forum: General discussion
Topic: How use LPTIM
Replies: 15
Views: 2597

Re: How use LPTIM

In fact HAL_LPTIM_MODULE_ENABLED is not enabled by default. you can add an hal_conf_extra.h file with: #define HAL_LPTIM_MODULE_ENABLED to enable it. In this archive, you will get a port of a STM32Cube project for L4: https://github.com/STMicroelectronics/STM32CubeL4/tree/master/Projects/NUCLEO-L47...
by hamady91
Tue Oct 18, 2022 9:42 am
Forum: General discussion
Topic: How use LPTIM
Replies: 15
Views: 2597

Re: How use LPTIM

ozcar wrote: Tue Oct 18, 2022 12:53 am Perhaps you need some #include in your code, like maybe for stm32l0xx_hal_lptim.h?
Even with including this file the definitions aren't reconized....
by hamady91
Tue Oct 18, 2022 9:37 am
Forum: General discussion
Topic: How use LPTIM
Replies: 15
Views: 2597

Re: How use LPTIM

try the normal Hardware Timers https://github.com/stm32duino/wiki/wiki/HardwareTimer-library those works well and doesn't use much power https://github.com/stm32duino/STM32Examples/blob/main/examples/Peripherals/HardwareTimer/Timebase_callback/Timebase_callback.ino void Update_IT_callback(void) { /...
by hamady91
Mon Oct 17, 2022 9:53 pm
Forum: General discussion
Topic: How use LPTIM
Replies: 15
Views: 2597

Re: How use LPTIM

In situations like this, you should think about a few questions. 1. Are there other solutions? 2. Is the timer able to wake up the chip? 3. What's the clocking arrangement? 4. How big or small is the desired interval? 5. Given 3 and 4 above, can the timer do it in one shot or you need to wake up th...
by hamady91
Mon Oct 17, 2022 8:18 pm
Forum: General discussion
Topic: How use LPTIM
Replies: 15
Views: 2597

Re: How use LPTIM

I need in stop mode to :
Wait x second
Toggle a pin
Wait x second
Toggle a pin

But i can't use RTC beacause it is already used for the LoRaWAN part (STM32WLE55).

It is not hard . If it was just in STM Cube IDE it would be easy but here the LPTIM don't seems to be simple to implement
by hamady91
Mon Oct 17, 2022 4:18 pm
Forum: General discussion
Topic: How use LPTIM
Replies: 15
Views: 2597

Re: How use LPTIM

Thanks you for the anwser Do you have a small example of a HAL implementation for LPTIM that could work with stm32duino Beaucause even with copying the code of the HAL generated in STM32 IDE i got these errors: LPTIM_HandleTypeDef hlptim1; static void MX_LPTIM1_Init(void) { /* USER CODE BEGIN LPTIM1...
by hamady91
Sun Oct 16, 2022 2:30 pm
Forum: General discussion
Topic: How use LPTIM
Replies: 15
Views: 2597

How use LPTIM

Hello,

When i try to use LPTIM1 of a Nucleo 32 l031k6 i got errors about the fact that TIM_TypeDef can't take the word "LPTIM1"

Is there a way to use LPTIM with stm32duino or i need to tuse HAL ?

Thanks

Go to advanced search