stm32f103c8 classB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 04:37 PM
hello,
I am applying the safety library provided by st company to stm32f103c8.
In the example provided, the capture function of TIM5 is connected to the LSI oscillator, but the MCU (stm32f103c8) I use does not seem to be able to connect to the LSI oscillator.
I need your advice.
Solved! Go to Solution.
- Labels:
-
STM32F1 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 09:22 PM
>>Can you check my code why TIM4_IRQHandler is not working?
You can't just invent connectivity to TIM4_CH4 and expect it to work. Or randomly cut-n-paste code from entirely different parts with different functionality and plumbing.
To get to the RTC / LSI clock you'd need to push it out the TAMPER pin and loop it back to a TIM pin you can actually monitor.
You could also watch the RTC count, or generate interrupts on a periodic basis.
How is it that those who know the least about coding and the MCU get tasked with "safety" ?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 05:58 PM
The STM32F103C8 doesn't have a TIM5, only TIM1-4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 06:39 PM
hi, Guru.
Thank you for your quick response.
You're right.
Stm32f103C8 has TIM1-TIM4, but any TIMx can't connect LSI oscillator.
if The TIM1-TIM4 of stm32f103c8 can't connect LSI oscillator, The Clock start-up self(and run) test of Functional Safety can't checked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 08:06 PM
I'm not sure what your code is supposed to do, but it is correct that none of the timers can be clocked from LSI. However, RTC can be clocked from LSI and presumably can give you the same type of error checking functionality.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 08:32 PM - edited ‎2023-11-29 08:33 PM
Hello @jihoon and welcome to the ST Community :smiling_face_with_smiling_eyes:.
As said @TDK WE don't know exactly what you want to do. So, i suggest you give us more informations about your needs.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 08:55 PM
/* Connect internally the TIM16_CH1 Input Capture to the LSI clock output */
/* Configure the TIM16 Input Capture of channel 1 */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 09:21 PM
Thank you for your interest.
/* Internally connect the TIM16_CH1 input capture to the LSI clock output */
//HAL_TIMEx_RemapConfig(&TIM_capture_handle, TIM_TIM16_RTC, TIM_TIM16_NONE);
How can stm32f103c8 connect Timer to LSI clock output as above example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 09:22 PM
>>Can you check my code why TIM4_IRQHandler is not working?
You can't just invent connectivity to TIM4_CH4 and expect it to work. Or randomly cut-n-paste code from entirely different parts with different functionality and plumbing.
To get to the RTC / LSI clock you'd need to push it out the TAMPER pin and loop it back to a TIM pin you can actually monitor.
You could also watch the RTC count, or generate interrupts on a periodic basis.
How is it that those who know the least about coding and the MCU get tasked with "safety" ?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 09:23 PM
Thank you for your interest
/* Internally connect the TIM16_CH1 input capture to the LSI clock output */
//HAL_TIMEx_RemapConfig(&TIM_capture_handle, TIM_TIM16_RTC, TIM_TIM16_NONE);
How can stm32f103c8 connect Timer to LSI clock output as above example?
If I can't connect, can't stm32f103c8 implement clock of safety function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-29 11:31 PM - edited ‎2023-11-30 01:03 AM
Dear Tesla DeLorean
You're right.
I'm not good enough, and I tried to solve it only within the example code.
However, using the timer and rtc counter values as your advice, it will be possible to check the validity of the cpu clock of safety.
I hope to receive your help in the future.
I respect you.
Thank you so much.