Search found 75 matches
- Fri Apr 23, 2021 10:01 am
- Forum: General discussion
- Topic: Help! TIM3 hardware timer is running 10* faster than configured
- Replies: 15
- Views: 6617
Re: Help! TIM3 hardware timer is running 10* faster than configured
Have you test my sketch ? is it working ? void TimerCallback() { uint32_t elapsed = micros() - timestamp; Serial2.println(elapsed); timestamp = micros(); } I strongly suggest to not use print function in your interrupt callback, because is a long processing probably larger than the 62microseconds y...
- Fri Apr 23, 2021 9:31 am
- Forum: General discussion
- Topic: Help! TIM3 hardware timer is running 10* faster than configured
- Replies: 15
- Views: 6617
Re: Help! TIM3 hardware timer is running 10* faster than configured
If i use this code to timestamp the timer instead. I put a breakpoint at timestamp = timenow and the value of elapsed is closer to 60us, sometimes it is 40us, if i step through it it turns back into 6us. Shouldn't elapsed be a constant 62us? static HardwareTimer timer = HardwareTimer(TIM3); static u...
- Fri Apr 23, 2021 9:01 am
- Forum: General discussion
- Topic: Help! TIM3 hardware timer is running 10* faster than configured
- Replies: 15
- Views: 6617
Re: Help! TIM3 hardware timer is running 10* faster than configured
Besides mlundin questions, we also miss version of core you used. Note: there is a new release 2.0 that just came out recently. I suggest you to use it. m_timer.pause(); It looks like there was some previous configuration of HardwareTimer ... So you provided some piece of you sketch, but it is much...
- Fri Apr 23, 2021 9:00 am
- Forum: General discussion
- Topic: Help! TIM3 hardware timer is running 10* faster than configured
- Replies: 15
- Views: 6617
Re: Help! TIM3 hardware timer is running 10* faster than configured
What processor is this ? How do you measure the actual timer overflow frequency ? Whats the value of SystemCoreClock ? Processor: STM32L452RE Code to measure frequency: static HardwareTimer timer = HardwareTimer(TIM3); static uint32_t timestamp = 0; void TimerCallback() { uint32_t elapsed = micros(...
- Thu Apr 22, 2021 11:23 am
- Forum: General discussion
- Topic: Help! TIM3 hardware timer is running 10* faster than configured
- Replies: 15
- Views: 6617
Help! TIM3 hardware timer is running 10* faster than configured
Hi, i've got an issue with the harwdare timer running 10* as fast as the configured amount. I have configured the timer to run at 16000Hz (around 62 microseconds per tick) but when measuring it, its ticking at around 6 microseconds. Here's how i'm configuring a hardware timer (TIM3) using the https:...
- Tue Feb 23, 2021 1:22 pm
- Forum: General discussion
- Topic: STM32L452RE error with HAL_I2C
- Replies: 6
- Views: 3643
Re: STM32L452RE error with HAL_I2C
So the HAL I2C error doesn't occur if i run the readVoltage() function in the ina260 library is called at a slower rate, i don't know if this is a real fix or just delaying it.
- Mon Feb 22, 2021 10:06 am
- Forum: General discussion
- Topic: STM32L452RE error with HAL_I2C
- Replies: 6
- Views: 3643
Re: STM32L452RE error with HAL_I2C
Hi, thanks for your help, The hal assert callback prints these locations. stm32l4xx_hal_i2c.c line 3165 assert_param(IS_I2C_TRANSFER_OPTIONS_REQUEST(XFerOptions)); and stm32l4xx_hal_i2c.c line 6428 assert_param(IS_TRANSFER_MODE(Mode)); The test sketch ina260_test works fine, here's the source code: ...
- Fri Feb 19, 2021 4:55 pm
- Forum: General discussion
- Topic: STM32L452RE error with HAL_I2C
- Replies: 6
- Views: 3643
Re: STM32L452RE error with HAL_I2C
Here's an attached stack trace. It's almost like some sort of memory leak, it only occurs if the program has been running for a while?
- Wed Feb 17, 2021 10:18 am
- Forum: General discussion
- Topic: STM32L452RE error with HAL_I2C
- Replies: 6
- Views: 3643
STM32L452RE error with HAL_I2C
Hi, my program is struggling with the HAL_I2C library. When the program is running it calculates the current voltage from a battery, if the battery voltage is too low it should stop. However, after around a minute or so, an assertion fails in the STM32l4XX_HAL_I2C.c at line 3210: https://github.com/...
- Wed Feb 10, 2021 11:53 am
- Forum: General discussion
- Topic: FTDI struggles to transfer above 38400baud?
- Replies: 4
- Views: 2850
FTDI struggles to transfer above 38400baud?
Hi, just trying to output a sine wave to a serial montior via an USART-USB FTDI device. When i put the baud rate higher than 38400 baud, the output becomes laggy? Does anyone know why this is?