打印
[MCU]

求教:Silicon EFM8 QFN24 配置PWM后,电平一直跳变 并伴随啸叫

[复制链接]
687|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
yhy08090|  楼主 | 2019-6-18 15:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 yhy08090 于 2019-6-19 10:08 编辑

Silicon  EFM8LB QFN24 配置PWM功能到引脚P1.0, 发现电平一直跳变,并且伴随啸叫,不知道怎么回事,求教

附对应的hwconfig配置:
<?xml version="1.0" encoding="ASCII"?>
<device:XMLDevice xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:device="http://www.silabs.com/ss/hwconfig/document/device.ecore" name="EFM8LB12F32ES0-B-QFN24" partId="mcu.8051.efm8.lb1.efm8lb12f32es0-b-qfn24" version="4.0.1" contextId="%DEFAULT%">
  <mode name="DefaultMode">
    <property object="ADC14_0" propertyId="adc14.clockconfiguration.adcclockdivider" value="6"/>
    <property object="ADC14_0" propertyId="adc14.control.resolution" value="14-Bit mode"/>
    <property object="ADC14_0" propertyId="adc14.control.startofconversion" value="Timer 5 overflow"/>
    <property object="ADC14_0" propertyId="adc14.inputselection.positiveinputselection" value="ADC0.22 (VDD Supply Pin)"/>
    <property object="ADC14_0" propertyId="adc14.powercontrol.enableidlepoweredoff" value="Power down"/>
    <property object="ADC14_0" propertyId="adc14.powercontrol.powerupdelaysetting" value="21"/>
    <property object="ADC14_0" propertyId="adc14.throughput.conversiontrackingtimesetting" value="6"/>
    <property object="ADC14_0" propertyId="adc14.view.view" value="Advanced"/>
    <property object="ADC14_0" propertyId="adc14.voltagereference.gaincontrol" value="0.25x gain"/>
    <property object="CIP51_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="CIP51_0" propertyId="cip51.prefetchenginecontrol.flashreadtiming" value="SYSCLK is below 75 MHz"/>
    <property object="CLOCK_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="CLOCK_0" propertyId="clock.clockselect.clocksourcedivider" value="SYSCLK / 1"/>
    <property object="CLOCK_0" propertyId="clock.clockselect.selectclocksource" value="Internal High Frequency Oscillator 1"/>
    <property object="CROSSBAR0" propertyId="xbar0.pca0.cex" value="CEX0"/>
    <property object="DefaultMode" propertyId="mode.diagramLocation" value="289, 296"/>
    <property object="EXTINT_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="EXTINT_0" propertyId="extint.int0int1configuration.int0polarity" value="Active high"/>
    <property object="EXTINT_0" propertyId="extint.int0int1configuration.int0portpinselection" value="P0.3"/>
    <property object="EXTINT_0" propertyId="extint.int0int1configuration.int1portpinselection" value="P0.2"/>
    <property object="I2CSLAVE_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="I2CSLAVE_0" propertyId="i2cslave.control.disablepreload" value="Enabled"/>
    <property object="I2CSLAVE_0" propertyId="i2cslave.control.enablei2c" value="Enabled"/>
    <property object="I2CSLAVE_0" propertyId="i2cslave.control.enablepinmode" value="I2C mode"/>
    <property object="I2CSLAVE_0" propertyId="i2cslave.control.enablescllowtimeout" value="Enabled"/>
    <property object="I2CSLAVE_0" propertyId="i2cslave.slaveaddress.i2chardwareslaveaddress" value="80"/>
    <property object="INTERRUPT_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="INTERRUPT_0" propertyId="interrupt.extendedinterruptenable1.enableprogrammablecounterarraypca0interrupt" value="Enabled"/>
    <property object="INTERRUPT_0" propertyId="interrupt.extendedinterruptenable1.enabletimer3interrupt" value="Enabled"/>
    <property object="INTERRUPT_0" propertyId="interrupt.extendedinterruptenable2.enablei2c0slaveinterrupt" value="Enabled"/>
    <property object="INTERRUPT_0" propertyId="interrupt.extendedinterruptpriority2high.i2c0slaveprioritycontrolmsbinterrupt" value="High"/>
    <property object="INTERRUPT_0" propertyId="interrupt.interruptenable.enableallinterrupts" value="Enabled"/>
    <property object="INTERRUPT_0" propertyId="interrupt.interruptenable.enabletimer2interrupt" value="Enabled"/>
    <property object="P0.0" propertyId="ports.settings.skip" value="Skipped"/>
    <property object="P0.1" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
    <property object="P0.1" propertyId="ports.settings.outputmode" value="Push-pull"/>
    <property object="P0.1" propertyId="ports.settings.skip" value="Skipped"/>
    <property object="P0.2" propertyId="ports.settings.skip" value="Skipped"/>
    <property object="P0.3" propertyId="ports.settings.skip" value="Skipped"/>
    <property object="P0.4" propertyId="ports.settings.skip" value="Skipped"/>
    <property object="P0.5" propertyId="ports.settings.skip" value="Skipped"/>
    <property object="P0.6" propertyId="ports.settings.skip" value="Skipped"/>
    <property object="P0.7" propertyId="ports.settings.skip" value="Skipped"/>
    <property object="P1.0" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
    <property object="P1.0" propertyId="ports.settings.outputmode" value="Push-pull"/>
    <property object="PBCFG_0" propertyId="pbcfg.settings.enablecrossbar" value="Enabled"/>
    <property object="PCACH_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="PCACH_0" propertyId="pcach.pcachannel.capturecompareflaginterrupt" value="Enabled"/>
    <property object="PCACH_0" propertyId="pcach.pcachannel.capturecomparehighbyte" value="128"/>
    <property object="PCACH_0" propertyId="pcach.pcachannel.capturecompareregister" value="32768"/>
    <property object="PCACH_0" propertyId="pcach.pcachannel.matchfunction" value="Enabled"/>
    <property object="PCACH_0" propertyId="pcach.pcachannelcapturecomparemode.enablechannel16bitpulsewidthmodulation" value="Enabled"/>
    <property object="PCACH_0" propertyId="pcach.pcachannelcapturecomparemode.enablechannelcomparatorfunction" value="Enabled"/>
    <property object="PCACH_0" propertyId="pcach.pcachannelcapturecomparemode.enablechannelpulsewidthmodulationmoden" value="Enabled"/>
    <property object="PCACH_0" propertyId="pcach.pcacontrol.channelcapturecomparemode" value="16-Bit pulse width modulator"/>
    <property object="PCACH_1" propertyId="ABPeripheral.included" value="true"/>
    <property object="PCACH_2" propertyId="ABPeripheral.included" value="true"/>
    <property object="PCACH_3" propertyId="ABPeripheral.included" value="true"/>
    <property object="PCACH_4" propertyId="ABPeripheral.included" value="true"/>
    <property object="PCACH_5" propertyId="ABPeripheral.included" value="true"/>
    <property object="PCA_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="PCA_0" propertyId="pca.pcacountertimerconfiguration.pcaclockfrequency" value="72.000 MHz"/>
    <property object="PCA_0" propertyId="pca.pcacountertimerconfiguration.pcaclockfrequencyintegervalue" value="72000000"/>
    <property object="PCA_0" propertyId="pca.pcacountertimerconfiguration.pcaclockperiod" value="13.000 nS"/>
    <property object="PCA_0" propertyId="pca.pcacountertimerconfiguration.selectpcacountertimerpulse" value="SYSCLK"/>
    <property object="PCA_0" propertyId="pca.pcacountertimerruncontrol.pcarun" value="Start"/>
    <property object="PCA_0" propertyId="pca.pcapwmconfiguration.selectcyclelength" value="11 bits"/>
    <property object="SMBUS_0" propertyId="smbus.configuration.enablesmbus" value="Enabled"/>
    <property object="SMBUS_0" propertyId="smbus.configuration.enablesmbusfreetimeoutdetection" value="Enabled"/>
    <property object="SMBUS_0" propertyId="smbus.configuration.enablesmbusscltimeoutdetection" value="Enabled"/>
    <property object="SMBUS_0" propertyId="smbus.configuration.enablesmbussetupandholdtimeextension" value="Enabled"/>
    <property object="SMBUS_0" propertyId="smbus.configuration.smbusclocksourceselection" value="Timer 1 overflow"/>
    <property object="SMBUS_0" propertyId="smbus.configuration.smbusslaveinhibit" value="Slave Disabled"/>
    <property object="SMBUS_0" propertyId="smbus.view.view" value="Advanced"/>
    <property object="TIMER01_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="TIMER01_0" propertyId="timer01.timer1highbyte.timer1highbyte" value="240"/>
    <property object="TIMER01_0" propertyId="timer01.timer1lowbyte.timer1lowbyte" value="52"/>
    <property object="TIMER01_0" propertyId="timer01.timer1mode2:8bitcountertimerwithautoreload.targetoverflowfrequency" value="1150151"/>
    <property object="TIMER01_0" propertyId="timer01.timer1mode2:8bitcountertimerwithautoreload.timerinitvalue" value="52"/>
    <property object="TIMER01_0" propertyId="timer01.timer1mode2:8bitcountertimerwithautoreload.timerreloadvalue" value="240"/>
    <property object="TIMER16_2" propertyId="ABPeripheral.included" value="true"/>
    <property object="TIMER16_2" propertyId="timer16.control.runcontrol" value="Start"/>
    <property object="TIMER16_2" propertyId="timer16.control.timerrunningstate" value="Timer is Running"/>
    <property object="TIMER16_2" propertyId="timer16.initandreloadvalue.targetoverflowfrequency" value="100"/>
    <property object="TIMER16_2" propertyId="timer16.initandreloadvalue.timerreloadvalue" value="5536"/>
    <property object="TIMER16_2" propertyId="timer16.reloadhighbyte.reloadhighbyte" value="21"/>
    <property object="TIMER16_2" propertyId="timer16.reloadlowbyte.reloadlowbyte" value="160"/>
    <property object="TIMER16_3" propertyId="ABPeripheral.included" value="true"/>
    <property object="TIMER16_4" propertyId="ABPeripheral.included" value="true"/>
    <property object="TIMER16_4" propertyId="timer16.control.runcontrol" value="Start"/>
    <property object="TIMER16_4" propertyId="timer16.control.timerrunningstate" value="Timer is Running"/>
    <property object="TIMER16_4" propertyId="timer16.initandreloadvalue.targetoverflowfrequency" value="50"/>
    <property object="TIMER16_5" propertyId="ABPeripheral.included" value="true"/>
    <property object="TIMER16_5" propertyId="timer16.control.runcontrol" value="Start"/>
    <property object="TIMER16_5" propertyId="timer16.control.timerrunningstate" value="Timer is Running"/>
    <property object="TIMER16_5" propertyId="timer16.initandreloadvalue.targetoverflowfrequency" value="16"/>
    <property object="TIMER_SETUP_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.clockcontrol0.timer01prescale" value="SYSCLK / 4"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.externalinterruptsettings.int0triggersensitivity" value="Edge-triggered"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.timer01control.timer1runcontrol" value="Start"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.timer1.mode" value="Mode 2, 8-bit Counter/Timer with Auto-Reload"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.timer1.timerrunningstate" value="Timer is Running"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.timer1.timerswitch1:runcontrol" value="Start"/>
    <property object="UARTE_1" propertyId="uarte.baudrategeneratorcontrol.actualbaudrate" value="115384"/>
    <property object="UARTE_1" propertyId="uarte.baudrategeneratorcontrol.baudratereloadhigh" value="254"/>
    <property object="UARTE_1" propertyId="uarte.baudrategeneratorcontrol.baudratereloadlow" value="200"/>
    <property object="UARTE_1" propertyId="uarte.baudrategeneratorcontrol.expectedbaudrate" value="115200"/>
    <property object="WDT_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="WDT_0" propertyId="wdt.watchdogcontrol.wdtenable" value="Disable"/>
  </mode>
  <mode name="BusFreeMode">
    <property object="BusFreeMode" propertyId="mode.diagramLocation" value="177, 137"/>
    <property object="CLOCK_0" propertyId="ABPeripheral.included" value="true"/>
    <property object="CLOCK_0" propertyId="clock.clockselect.clocksourcedivider" value="SYSCLK / 1"/>
    <property object="CROSSBAR0" propertyId="xbar0.pca0.cex" value="CEX0"/>
    <property object="WDT_0" propertyId="ABPeripheral.included" value="true"/>
  </mode>
  <modeTransition>
    <property object="RESET → BusFreeMode" propertyId="modeTransition.source" value="RESET"/>
    <property object="RESET → BusFreeMode" propertyId="modeTransition.target" value="BusFreeMode"/>
  </modeTransition>
  <modeTransition>
    <property object="BusFreeMode → DefaultMode" propertyId="modeTransition.source" value="BusFreeMode"/>
    <property object="BusFreeMode → DefaultMode" propertyId="modeTransition.target" value="DefaultMode"/>
  </modeTransition>
</device:XMLDevice>



使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

7

主题

47

帖子

0

粉丝