完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我一直试图使用sm8l发现板上的定时器4的溢出中断使LED闪烁。到目前为止,我还没有成功。我目前正在使用IAR Embedded Workbench和Stm库stm8l。 我需要帮助。 这是我正在尝试做的事情: 这是main.c 并且中断处理程序在stm8l15x_it.c中,我还在此文件中包含了stm8l15x.h头文件。 我究竟做错了什么? 提前致谢 #stm8l #interrupts #timer 以上来自于谷歌翻译 以下为原文 hello, I've been trying to blink an led using an overflow interrupt with timer 4 on the sm8l discovery board. So far I haven't made it work. I'm currently using IAR Embedded Workbench with the Std library for stm8l. I need help. here's what I'm trying to do: here's the main.c
and the interrupt handler is in the stm8l15x_it.c, I've also included in this file the stm8l15x.h header file.
What am I doing wrong? thanks in advance #stm8l #interrupts #timer |
|
相关推荐
1个回答
|
|
嗨约瑟夫,
您可能需要: TIM4_EGR = 0x1; / *强制预分频器更新* / 你需要: TIM4_CR1 | = 0x1; / *启用计数器* / 希望有所帮助, 伊恩 以上来自于谷歌翻译 以下为原文 Hi Joseph, You might need: TIM4_EGR = 0x1; /* Force prescaler update */ And you will need: TIM4_CR1 |= 0x1; /* Enable counter */ Hope that helps, Ian |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2715 浏览 1 评论
3235 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1807 浏览 1 评论
3643 浏览 6 评论
6031 浏览 21 评论
1332浏览 4评论
206浏览 3评论
195浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
348浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
440浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-19 12:09 , Processed in 1.206155 second(s), Total 76, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191