问答

汇集网友智慧,解决技术难题

leison2002

TA的家园币:54  

  • 用HC32F460的I2S连接WM8978音频IC

    I2S为主模式,MCK允许,EXCK禁止,配置了I2S,允许TXEN,配置DMA,触发为TX输出中断,中断配置了回调函数,当允许DMA通道后,没有进入发送中断。不知错在那,搜索复制另外问一上,I2S在不接外部的WM8978模块时,是不是也有数据输出。

    hc32f460 I2S WM8978 音频

    2022-01-01 1
  • HC32F460 的PH2这个脚配置成外部双沿中断

    voidPortH_Init(){stc_exint_config_tstcExtiConfig;stc_irq_regi_conf_tstcIrqRegiConf;stc_port_init_tstcPortInit;/*configurationstructureinitialization*/MEM_ZERO_STRUCT(stcExtiConfig);MEM_ZERO_STRUCT(stcIrqRegiConf);MEM_ZERO_STRUCT(stcPortInit);/**************************************************************************//*ExternalIntCh.2*//**************************************************************************/stcExtiConfig.enExitCh=ExtiCh02;/*Filtersetting*/stcExtiConfig.enFilterEn=Enable;stcExtiConfig.enFltClk=Pclk3Div64;stcExtiConfig.enExtiLvl=ExIntBothEdge;EXINT_Init(&stcExtiConfig);/*SetExternalInt*/MEM_ZERO_STRUCT(stcPortInit);stcPortInit.enPullUp=Enable;stcPortInit.enExInt=Enable;PORT_Init(PortH,Pin02,&stcPortInit);/*SelectExternalIntCh.2*/stcIrqRegiConf.enIntSrc=INT_PORT_EIRQ2;/*RegisterExternalInttoVect.No.000*/stcIrqRegiConf.enIRQn=Int015_IRQn;/*Callbackfunction*/stcIrqRegiConf.pfnCallback=&PORTH_PIN2_Callback;/*RegistrationIRQ*/enIrqRegistration(&stcIrqRegiConf);/*Clearpending*/NVIC_ClearPendingIRQ(stcIrqRegiConf.enIRQn);/*Setpriority*/NVIC_SetPriority(stcIrqRegiConf.enIRQn,DDL_IRQ_PRIORITY_DEFAULT);/*EnableNVIC*/NVIC_EnableIRQ(stcIrqRegiConf.enIRQn);}voidPORTH_PIN2_Callback(){if(Set==EXINT_Irq**Get(ExtiCh02)){EXINT_Irq**Clr(ExtiCh02);}}中断号没有被其他中断用到,这样配置后,会一直进放回调函数,不知会什么?搜索复制

    hc32f460 ST tc stc TI ic

    2021-11-29 0