TI的工程师们,请问C5515按照手册配置了idle3低功耗,手册中说配置好wakeup引脚输入,并使能RTC中断,就能通过加载一个高电平(本人加了一个3.3V)就能唤醒,但是中断标志位没有置位。是为什么呢? 跟我连着仿真器有关系么?
Shine:
请检查一下wakeup唤醒时间是否做够长>30.5us.
5.8.2 Wake-Up From IDLE Electrical Data/Timinghttp://www.ti.com/lit/ds/symlink/tms320c5515.pdf
Weifeng Ying:
回复 Shine:
有没有对应的进入idle3的工程,我在想是不是我配置的不对
#define IDLE3// ioport#define FADDR_POWER 0x8401#define CCR2 0x1C1F#define CGCR1 0x1C20#define CLKSTOP 0x1C3A#define PCGCR1 0x1C02#define PCGCR2 0x1C03#define USBSCR 0x1C32#define ICR 0x0001#define RTCPMGT 0x1930#define RTCINTEN 0x1900#define RTCINTFL 0x1920#define RTCINTREG 0x1924
// not ioport#define IER0 0x0000#define IER1 0x0045#define IFR0 0x0001#define IFR1 0x0046#define ST1_55 0x0003
*(volatile ioport Uint16 *)FADDR_POWER = *(volatile ioport Uint16 *)FADDR_POWER | (1<<1);
// 2. Set the USB clock stop request bit (USBCLKSTREQ) in the CLKSTOP register to request permission // to shut off the USB peripheral clock. *(volatile ioport Uint16 *)CLKSTOP = *(volatile ioport Uint16 *)CLKSTOP | (1<<2);
// 3. Wait until the USB acknowledges the clock stop request by polling the USB clock stop acknowledge bit // (USBCLKSTPACK) in the CLKSTOP register. while( *(volatile ioport Uint16 *)CLKSTOP & (1<<2) == 0 );
// 4. Disable the USB peripheral clock by setting USBCG = 1 in the peripheral clock gating control register 2 // (PCGCR2). *(volatile ioport Uint16 *)PCGCR2 = *(volatile ioport Uint16 *)PCGCR2 | (1<<2); // 5. Disable the USB oscillator by setting USBOSCDIS = 1 in the USB system control register (USBSCR). *(volatile ioport Uint16 *)USBSCR = *(volatile ioport Uint16 *)USBSCR | (1<<2); /* To enable the USB clock domain, follow these steps: 1. Enable the USB oscillator by setting USBOSCDIS = 0 in USBSCR. 2. Wait for the oscillator to stabilize. Refer to the device-specific data manual for oscillator stabilization time. 3. Enable the USB peripheral clock by setting USBCG = 0 in the peripheral clock gating control register 2 (PCGCR2). 4. Clear the USB clock stop request bit (USBCLKSTREQ) in the CLKSTOP register. 5. Clear the SUSPENDM bit in FADDR register. */// 3. Idle all the desired peripherals in the peripheral clock domain by modifying the peripheral clock gating// configuration registers (PCGCR1 and PCGCR2). See Section 1.5.3.2 for more details on setting the// DSP peripherals to idle mode.// *(volatile ioport Uint16 *)PCGCR1 = 0xffff ;// *(volatile ioport Uint16 *)PCGCR2 = 0x7f ;
// 4. Disable the clock generator domain as described in Section 1.5.3.3. /* To save power, the system clock generator can be placed in its BYPASS MODE and its PLL can be placed in power down mode. When the system clock generator is in the BYPASS MODE, the clock generator is not used and the system clock (SYSCLK) is driven by either the CLKIN pin or the real-time clock (RTC). For more information entering and exiting the bypass mode of the clock generator, see To save power, you can put the PLL in its power down mode. You can power down the PLL by setting the PLL_PWRDN = 1 in the clock generator control register CGCR1. However, before powering down the PLL, you must first place the clock generator in bypass mode. When the PLL is powered up (PLL_PWRDN = 0), the PLL will start its phase-locking sequence. You must keep the clock generator in BYPASS MODE for at least 4 mS while the phase-locking sequence is ongoing. See Section 1.4.3.2 for more details on the PLL_MODE of the clock generator. */ // pass-by PLL *(volatile ioport Uint16 *)CCR2 = 0x00 ; // power down PLL *(volatile ioport Uint16 *)CGCR1 = 0x1000 ;
// 5. Clear all interrupts by writing ones to the CPU interrupt flag registers (IFR0 and IFR1). *(volatile Uint16 *)IFR0 = *(volatile Uint16 *)IFR0 ; *(volatile Uint16 *)IFR1 = *(volatile Uint16 *)IFR1 ;
// 6. Enable the appropriate wake-up interrupt in the CPU interrupt enable registers (IER0 and IER1). If// using the WAKEUP pin to exit this mode, configure the WAKEUP pin as input by setting WU_DIR = 1// in the RTC power management register (RTCPMGT). If using the RTC alarm or periodic interrupt as a// wake-up event, the RTCINTEN bit must be set in the RTC interrupt enable register (RTCINTEN). *(volatile Uint16 *)IER1 = *(volatile Uint16 *)IER1 | (1<<2) ; // enable global interruput *(volatile Uint16 *) ST1_55 = *(volatile Uint16 *) ST1_55 & ~(1<<7 ); //asm(" bit(ST1,#11) = #0 "); // GLOBAL INTERRUPT ENABLE
*(volatile ioport Uint16 *)RTCINTFL = 0x803F ; //clear interrupt flags *(volatile ioport Uint16 *)RTCINTEN = 0x0001 ; //RTCINTEN enabled *(volatile ioport Uint16 *)RTCINTREG = 0x0020 ; //EXTINTEN enabled *(volatile ioport Uint16 *)RTCPMGT = 0x0000 ;
// 7. Disable the CPU domain by setting to 1 the CPUI, MPORTI, XPORTI, DPORTI, IPORTI, and CPI bits// of the idle configuration register (ICR). *(volatile ioport Uint16 *)ICR = 0x03EF ;
// 8. Apply the new idle configuration by executing the IDLE instruction. The content of ICR is copied to the// idle status register (ISTR). The bits of ISTR are then propagated through the CPU domain system to// enable or disable the specified clocks. asm(" idle");
这样写主程序对么?
没有配置中断服务例程
Shine:
回复 Weifeng Ying:
在下面的文档上有详细的进入IDLE3步骤。1.5.5.2 IDLE3 Procedurehttp://www.ti.com/lit/ug/sprufx5e/sprufx5e.pdf
Weifeng Ying:
回复 Shine:
你好,我想问一下DSP C5515我为什么进不了低功耗,按照手册上配置了,执行idle 指令后,就停止在这条指令,手动wakeup也不能继续执行。我没有配置wakeup中断服务例程。按照手册配置的时候,也发现有些寄存器赋值后,通过CCS查看寄存器,发现有个别bit好像赋值不了