你好Aurelien,
对于ICU,eMIOS HAL的观点一直受限于从频道0到频道7和频道24。
从RM,您可以通过SAIC(单动作输入捕获)使用从通道0到通道31的ICU
对于PWM,从通道8到通道15的eMIOS HAL观点。
如果你想使用eMIOS ICU,我建议你更新icu_lld.c。
(参见下文)
并为通道8和通道9添加匹配处理程序
最好的祝福
二万
以上来自于谷歌翻译
以下为原文
Hello Aurelien ,
for ICU , eMIOS HAL point of view has been limited from Channel 0 to Channel 7 and Channel 24.
from the RM, you can use ICU from channel 0 to Channel 31 by SAIC (Single Action Input Capture)
for PWM , eMIOS HAL point of view from Channel 8 to Channel 15.
if you want to use eMIOS ICU , i advice you to update icu_lld.c.
(cf below)
- #if SPC5_ICU_USE_EMIOS0_CH8
- /* Driver initialization.*/
- ICUD8.clock = SPC5_EMIOS0_CLK;
- #endif /* SPC5_ICU_USE_EMIOS0_CH7 */
- #if SPC5_ICU_USE_EMIOS0_CH0
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH0 */
- #if SPC5_ICU_USE_EMIOS0_CH1
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH1 */
- #if SPC5_ICU_USE_EMIOS0_CH2
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH2 */
- #if SPC5_ICU_USE_EMIOS0_CH3
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH3 */
- #if SPC5_ICU_USE_EMIOS0_CH4
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH4 */
- #if SPC5_ICU_USE_EMIOS0_CH5
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH5 */
- #if SPC5_ICU_USE_EMIOS0_CH6
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH6 */
- #if SPC5_ICU_USE_EMIOS0_CH7
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH7 */
- #if SPC5_ICU_USE_EMIOS0_CH24
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH24 */
- #if SPC5_ICU_USE_EMIOS1_CH24
- increase_emios1_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS1_CH24 */
and add the matching handler for channel 8 and channel 9
- * @brief eMIOS0 Channels 6 and 7 interrupt handler.
- * @note It is assumed that the various sources are only activated if the
- * associated callback pointer is not equal to @p NULL in order to not
- * perform an extra check in a potentially critical interrupt handler.
- OSAL_IRQ_HANDLER(SPC5_EMIOS0_GFR_F6F7_HANDLER) {
- #if SPC5_ICU_USE_EMIOS0_CH6
- icu_lld_serve_interrupt(&ICUD7);
- #if SPC5_ICU_USE_EMIOS0_CH7
- icu_lld_serve_interrupt(&ICUD8);
- #endif /* SPC5_ICU_USE_EMIOS0_CH6 || SPC5_ICU_USE_EMIOS0_CH7 */
Best regards
Erwan
你好Aurelien,
对于ICU,eMIOS HAL的观点一直受限于从频道0到频道7和频道24。
从RM,您可以通过SAIC(单动作输入捕获)使用从通道0到通道31的ICU
对于PWM,从通道8到通道15的eMIOS HAL观点。
如果你想使用eMIOS ICU,我建议你更新icu_lld.c。
(参见下文)
并为通道8和通道9添加匹配处理程序
最好的祝福
二万
以上来自于谷歌翻译
以下为原文
Hello Aurelien ,
for ICU , eMIOS HAL point of view has been limited from Channel 0 to Channel 7 and Channel 24.
from the RM, you can use ICU from channel 0 to Channel 31 by SAIC (Single Action Input Capture)
for PWM , eMIOS HAL point of view from Channel 8 to Channel 15.
if you want to use eMIOS ICU , i advice you to update icu_lld.c.
(cf below)
- #if SPC5_ICU_USE_EMIOS0_CH8
- /* Driver initialization.*/
- ICUD8.clock = SPC5_EMIOS0_CLK;
- #endif /* SPC5_ICU_USE_EMIOS0_CH7 */
- #if SPC5_ICU_USE_EMIOS0_CH0
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH0 */
- #if SPC5_ICU_USE_EMIOS0_CH1
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH1 */
- #if SPC5_ICU_USE_EMIOS0_CH2
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH2 */
- #if SPC5_ICU_USE_EMIOS0_CH3
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH3 */
- #if SPC5_ICU_USE_EMIOS0_CH4
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH4 */
- #if SPC5_ICU_USE_EMIOS0_CH5
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH5 */
- #if SPC5_ICU_USE_EMIOS0_CH6
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH6 */
- #if SPC5_ICU_USE_EMIOS0_CH7
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH7 */
- #if SPC5_ICU_USE_EMIOS0_CH24
- increase_emios0_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS0_CH24 */
- #if SPC5_ICU_USE_EMIOS1_CH24
- increase_emios1_active_channels();
- #endif /* SPC5_ICU_USE_EMIOS1_CH24 */
and add the matching handler for channel 8 and channel 9
- * @brief eMIOS0 Channels 6 and 7 interrupt handler.
- * @note It is assumed that the various sources are only activated if the
- * associated callback pointer is not equal to @p NULL in order to not
- * perform an extra check in a potentially critical interrupt handler.
- OSAL_IRQ_HANDLER(SPC5_EMIOS0_GFR_F6F7_HANDLER) {
- #if SPC5_ICU_USE_EMIOS0_CH6
- icu_lld_serve_interrupt(&ICUD7);
- #if SPC5_ICU_USE_EMIOS0_CH7
- icu_lld_serve_interrupt(&ICUD8);
- #endif /* SPC5_ICU_USE_EMIOS0_CH6 || SPC5_ICU_USE_EMIOS0_CH7 */
Best regards
Erwan
举报