嗨,
我想使用CTU来触发在OPWM模式下运行的EMIOS统一通道生成的事件时的ADC转换。 ADC和EMIOS已配置并显示正常工作,但CTU似乎无法运行。
据我所知,必须通过设置适当的位来启用CTU。引用:
/ *关于PCTL寄存器的注意事项:* /中只实现了一些PCTL
/ * Bolero 3M。为了使PCTL易于寻址,这些* /
/ *定义为数组(即ME.PCTL [x] .R)。这意味着你有* /
/ *在寻址这些寄存器时要小心,以免* /
/ *访问未实现的PCTL。以下是:* /
/ * 104,92,91,73,72,69,68,60,44,33,32,24,23,21-16,13-4 * /
union {/ * Peripheral Control 0..143(+ 0x00C0-0x0128)* /
vuint8_t R;
struct {
vuint8_t:1;
vuint8_t DBG_F:1;
vuint8_t LP_CFG:3;
vuint8_t RUN_CFG:3;
B;
PCTL [105];
,根据数据表,这显然意味着寄存器57可用,并且是CTU的正确注册:
所以我尝试启用CTU:
& sharpdefine SPC5_CTUL_START_PCTL(SPC5_ME_PCTL_RUN(1)| SPC5_ME_PCTL_LP(2))
SPCSetPeripheralClockMode(57,SPC5_CTUL_START_PCTL);
,但无法验证实际内容,因为SFR View中没有这样的寄存器。 SPCSetPeripheralClockMode()执行OK,但是查看我的内容可以看到CTU仍然被冻结:
所以我的问题是,在SPC56EC74中启用CTU的正确方法是什么?另一个问题是为什么ME_PCTL57没有显示在SFR视图中?
问候
蒂姆
#spc56xx #ctu
以上来自于谷歌翻译
以下为原文
Hi,
I want to use CTU in to trigger ADC conversions upon events generated by EMIOS Unified Channels running in OPWM mode. The ADC and EMIOS are configured and appear working, however CTU does not seem opera
tional.
As far as I understand the CTU has to be enabled by setting appropriate bit in . Quoting the :
/* Note on PCTL registers: There are only some PCTL implemented in */
/* Bolero 3M. In order to make the PCTL easily addressable, these */
/* are defined as an array (ie ME.PCTL[x].R). This means you have */
/* to be careful when addressing these registers in order not to */
/* access a PCTL that is not implemented. Following are available: */
/* 104, 92, 91, 73, 72, 69, 68, 60, , 44, 33, 32, 24, 23, 21-16, 13-4*/
union { /* Peripheral Control 0..143 (+0x00C0-0x0128) */
vuint8_t R;
struct {
vuint8_t :1;
vuint8_t DBG_F:1;
vuint8_t LP_CFG:3;
vuint8_t RUN_CFG:3;
} B;
} PCTL[105];
, which apparently means that register 57 is available, and is the right register for the CTU, according to the datasheet:
So I try enabling the CTU:
&sharpdefine SPC5_CTUL_START_PCTL (SPC5_ME_PCTL_RUN(1) | SPC5_ME_PCTL_LP(2))
SPCSetPeripheralClockMode (57, SPC5_CTUL_START_PCTL);
, but cannot verify the actual contents of as there is no such register in SFR View. The SPCSetPeripheralClockMode() executes OK, however looking at the contents of I can see that the CTU still is frozen:
So my question is, what should be the proper way to enable CTU in SPC56EC74? Another question is why the ME_PCTL57 is not shown in the SFR View?
Regards
Tim
#spc56xx #ctu
0