2024-07-02
GR5526 GUI专题(4) - Lvgl字体的位图数组合并转换为bin文件的说明
写技术文章
精选推荐
Ping
Dual Timer新增了IO Control功能,即满足一定条件后可以直接触发IO的动作。每个Dual Timer支持3路IO控制,每路IO可以绑定5种Dual Timer事件进行触发,分别是Start、
Compare1,Compare2,Period、Stop,触发IO的动作支持高电平、低电平和电平翻转。
关于IO Control功能可参考datasheet 4.3.2.3.2章节介绍,详细说明如下:
1. I/O is muxed to dual timer in order to implement I/O control function.
MUX | Signal |
49 | DUALTIMER_1A |
50 | DUALTIMER_1B |
51 | DUALTIMER_1C |
52 | DUALTIMER_2A |
53 | DUALTIMER_2B |
54 | DUALTIMER_2C |
2. I/O initial state can be defined through the IO_INIT_SET register before the I/O control channel is enabled.
3. There are up to five compare events for I/O control. When the dual timer starts counting, the start event will trigger the channel I/O action. When the counter value reaches zero, the PERIOD event will trigger the channel I/O action. When the dual timer stops counting, the STOP event will trigger the channel I/O action. Each channel has two custom compare values which can be configured in COUNT_x1IO and COUNT_x2IO registers. When the counter value reaches the compare value, the IOx_C1 and IOx_C2 events will trigger the channel I/O action. Compare value greater than reload value will not trigger an interrupt or IO control action.
4. I/O action supports I/O set, reset and toggle.
5. Flexible and configurable interrupts for all compare events in I/O control function.
6. Channel I/O will trigger a PERIOD event action and a STOP event action in sequence at the end of the counting in one-shot mode.
For example, the I/O action timing diagram of I/O control function using dual timer is shown in the figure below.
结合Dual Timer新增的指定周期个数的设置功能,可以实现指定个数的方波的产生。
Dual Timer supports the specified number of cycles to stop counting in periodic mode. If the PERIOD_COUNT register is configured with a value, the Dual Timer will stop counting after the specified number of cycles are completed. The value is valid when it is greater than 1. The PERIOD_COUNT register is only valid when one of the I/O control channels
is enabled.
打开微信,使用“扫一扫”即可关注