▍1. APB_timer
说明: 设计一个挂载在 APB 总线上的计数器,按照 APB 的时序给计数器赋值,主 机通过地址对计数器进行配置,通过数据输入端口给计数器设置计数器最大值, 并通过数据输出端口输出计数器的计数值。该设计还设置了一个计数完成信号, 当计数器满足模式配置后的计数要求时,会将该信号拉高(A counter mounted on the APB bus is designed. The counter is assigned according to the sequence of APB The computer configures the counter through the address and sets the maximum value of the counter through the data input port, And output the count value of the counter through the data output port. The design also sets a count completion signal, When the counter meets the counting requirements after the mode configuration, the signal will be pulled high)