This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DVFS issue

Other Parts Discussed in Thread: DM3730

I’ve noticed a problem with DVFS when using the Windows CE 6.0 BSP for Cortex-A8 processors.

I'm running Windows CE on a 3730 EVM, using the standard OSDesign with the following component changes:

 

- Removed USB host driver

- Removed camera driver

- Included DVFS support

- Included CPU Load Policy

 

The system runs fine for 30 seconds or so, until the CPU load policy thread starts to dynamically switch through the operating points and voltage settings.

When the lowest point (OPM0) is hit, the system hangs (I've included the debug output below). I understand that the difference between OPM1 and OPM0 is the VDD2 setting. If I include the camera or USB host driver, the system is contrained to only go as low as OPM2, so it runs fine.

 

Is this a known issue? If so, is there a workaround? (Aside from restricting the DVFS from going as low as OPM0).

Any information on why the EVM hangs when OPM0 is hit would be gratefully received!

 

best regards,

Rik Attrill

 

-----------------------------------------

Launch Windows CE image by jumping to 0x800122f8...

Windows CE Kernel for ARM (Thumb Enabled) Built on Nov  3 2010 at 07:30:04

OAL: CPU revision 0x10:DM3730

OAL: CPU L2 Aux register 0x400042

****Profiler Build****

---High Performance Frequency is 26001059 hz---

Compensating OPP1 for 63mV Orig nvalue:0x99dac1 New nvalue:0x99ab97

Compensating OPP2 for 63mV Orig nvalue:0x9a81e3 New nvalue:0xaadec3

Compensating OPP3 for 75mV Orig nvalue:0xaab9a4 New nvalue:0xaaa28f

SetOpp to 3

DVFS_InitConstraint: opmCurrent=4, opmCeiling=4, opmFloor=0frequency=300, floor=0, ceiling=100

frequency=300, floor=100, ceiling=250

frequency=600, floor=250, ceiling=500

frequency=800, floor=500, ceiling=700

frequency=1000, floor=700, ceiling=1000

ECC TYPE is Hamming 1 bit

DSPLINK Module (1.65.00.03) created on Date: Jan 17 2011 Time: 15:02:36

                                                                       DRIVER_VERSION : 110, DATECODE : 041707

Rx PIO

Tx PIO

Lan9220 identified. ID_REV = 0x92200000

Use IntPhy

This chip doesn't support Auto Mdix!!!

SDHC: CPU revision 0x10

SDHC host controller initialize: m_fastPathSDIO:1 m_fastPathSDMEM:0

touchp: calibration: new calibration data is "2006,2046 546,526 528,3528 3478,3577 3456,583 "

OPM3

SetOpp to 2

VDD1 1.2625V

OPM2

SetOpp to 1

VDD1 1.1000V

OPM1

SetOpp to 0

VDD1 0.9375V

OPM0

SetOpp to 0

VDD2 0.9375V

  • Hi

    I just got this problem few days before. And your BSP version should be BSP_WINCE_ARM_A8_01_02_00.

    I founded that is because the 65%(default) CPU loading interrupt was not correctly initialized. So when the system jumps to OPM0, this interrupt would be enabled, which caused the system fail.

     

    In your BSP,  in the "COMMON_TI_V1\COMMON_TI\OAL\OMAP_INTR\oem.c"

    you should add 

    if (pvData != NULL) OALIntrSetDataIrqs(count, pIrqs, pvData, cbData);

    before 

    rc = OALIntrEnableIrqs(count, pIrqs);

    and you should also include #include <oal_intrex.h> in this file.

     

    After that, the cpu load policy would function correctly.

    Regards, Liang

  • Hi Changwei,

     

    Thanks for your response. I've added that code into the reference BSP, and it now behaves slightly differently.

    It no longer hangs (from inspection, I think it was trapped in an infinite loop - fixed by your code snippet above). However, data abort exceptions are thrown almost immediately after it goes down to OPM0.

    Here is the debug output now:

     

    Launch Windows CE image by jumping to 0x80012380... 

    Windows CE Kernel for ARM (Thumb Enabled) Built on Nov  3 2010 at 07:30:04

    OAL: CPU revision 0x10:DM3730

    OAL: CPU L2 Aux register 0x400042

    ****Profiler Build****

    ---High Performance Frequency is 26000158 hz---

    Compensating OPP1 for 63mV Orig nvalue:0x99dac1 New nvalue:0x99ab97

    Compensating OPP2 for 63mV Orig nvalue:0x9a81e3 New nvalue:0xaadec3

    Compensating OPP3 for 75mV Orig nvalue:0xaab9a4 New nvalue:0xaaa28f

    SetOpp to 3

    DVFS_InitConstraint: opmCurrent=4, opmCeiling=4, opmFloor=0frequency=300, floor=0, ceiling=100

    frequency=300, floor=100, ceiling=250

    frequency=600, floor=250, ceiling=500

    frequency=800, floor=500, ceiling=700

    frequency=1000, floor=700, ceiling=1000

    ECC TYPE is Hamming 1 bit

    DSPLINK Module (1.65.00.03) created on Date: Jan 17 2011 Time: 15:02:36

                                                                           DRIVER_VERSION : 110, DATECODE : 041707

    Rx PIO

    Tx PIO

    Lan9220 identified. ID_REV = 0x92200000

    Use IntPhy

    This chip doesn't support Auto Mdix!!!

    SDHC: CPU revision 0x10

    SDHC host controller initialize: m_fastPathSDIO:1 m_fastPathSDMEM:0

    INFO: OMAPVrfbSurface::Allocate() - Allocating VRFB View # 0

    touchp: calibration: new calibration data is "2057,2050 537,536 564,3569 3498,3569 3559,559 "

    OPM3

    SetOpp to 2

    VDD1 1.2625V

    OPM2

    SetOpp to 1

    VDD1 1.1000V

    OPM1

    SetOpp to 0

    VDD1 0.9375V

    OPM0

    SetOpp to 0

    VDD2 0.9375V

    Exception 'Prefetch Abort'(3) Thread-Id=00e50002(pth=8716733c) PC=8004c6dc BVA=c01f6000, dwInfo = 00000807

    R0=00000000  R1=0000fffc  R2=6000001f  R3=ffffc800

    R4=d02ffc2c  R5=8716733c  R6=00000000  R7=00000000

    R8=00000002  R9=00000000 R10=00000000 R11=d02ffe14

    R12=8004c6dc  SP=d02ffc14  Lr=8004c6dc Psr=6000001f

    Exception 'Prefetch Abort'(3) Thread-Id=00e50002(pth=ffffc62c) PC=001ed2f0 BVA=c01f6000, dwInfo = 00000807

    R0=0000001e  R1=00000000  R2=001ab708  R3=001ab708

    R4=bb10818c  R5=00000016  R6=00000004  R7=0000000c

    R8=8236db24  R9=8236f760 R10=00000000 R11=d02ffe14

    R12=80031ea0  SP=ffffc77c  Lr=001ed2f0 Psr=20000093

    Exception 'Prefetch Abort' (3): Thread-Id=00e50002(pth=8716733c), Proc-Id=00400002(pprc=82372308) 'NK.EXE', VM-active=057d0002(pprc=8c8fa5c4) 'explorer.exe'

    PC=001ed2f0(???+0x001ed2f0) RA=001ed2f0(???+0x001ed2f0) SP=ffffc77c, BVA=001ed2f0

    Exception 'Data Abort'(4) Thread-Id=00e50002(pth=8716733c) PC=800344e0 BVA=00000000, dwInfo = 00000007

    R0=00000000  R1=ffffc570  R2=00000000  R3=ffffffe3

    R4=c0000005  R5=80000000  R6=00000000  R7=ffffc5a8

    R8=001ed2ec  R9=00000000 R10=00000000 R11=001ed2f0

    R12=ffffc5a0  SP=ffffc510  Lr=c0037b50 Psr=2000001f

    Exception 'Data Abort'(4) Thread-Id=00e50002(pth=8716733c) PC=800344e0 BVA=00000000, dwInfo = 00000007

    R0=00000000  R1=ffffc570  R2=00000000  R3=ffffffe3

    R4=c0000005  R5=80000000  R6=00000000  R7=ffffc5a8

    R8=001ed2ec  R9=00000000 R10=00000000 R11=001ed2f0

    R12=ffffc5a0  SP=ffffc510  Lr=c0037b50 Psr=2000001f

    Exception 'Data Abort' (4): Thread-Id=00e50002(pth=8716733c), Proc-Id=00400002(pprc=82372308) 'NK.EXE', VM-active=057d0002(pprc=8c8fa5c4) 'explorer.exe'

    PC=800344e0(kernel.dll+0x000064e0) RA=c0037b50(k.coredll.dll+0x00017b50) SP=ffffc510, BVA=00000000

    Exception 'Prefetch Abort'(3) Thread-Id=00570002(pth=871d7728) PC=8004c6dc BVA=00000000, dwInfo = 00000007

    R0=00000000  R1=0000fffc  R2=6000001f  R3=ffffc800

    R4=d00afd9c  R5=871d7728  R6=00000000  R7=d00afd8c

    R8=00000002  R9=00000000 R10=00000000 R11=00000000

    R12=8004c6dc  SP=d00afd84  Lr=8004c6dc Psr=6000001f

    Exception 'Prefetch Abort'(3) Thread-Id=00570002(pth=ffffc410) PC=001ee69c BVA=00000000, dwInfo = 00000007

    R0=0000001e  R1=00000000  R2=001ab71c  R3=001ab71c

    R4=bb10818c  R5=0000001f  R6=00000004  R7=0000000c

    R8=8236db24  R9=8236f760 R10=00000000 R11=00000000

    R12=00000000  SP=ffffc560  Lr=001ee69e Psr=20000093

    Exception 'Prefetch Abort' (3): Thread-Id=00570002(pth=871d7728), Proc-Id=00400002(pprc=82372308) 'NK.EXE', VM-active=057d0002(pprc=8c8fa5c4) 'explorer.exe'

    PC=001ee69c(???+0x001ee69c) RA=001ee69e(???+0x001ee69e) SP=ffffc560, BVA=001ee69c

    Exception 'Prefetch Abort'(3) Thread-Id=023c0002(pth=86c2f9b4) PC=8004c6dc BVA=00000000, dwInfo = 00000007

    R0=00000102  R1=00000002  R2=6000001f  R3=ffffc800

    R4=deb3fc3c  R5=86c2f9b4  R6=00000000  R7=deb3fc2c

    R8=00000002  R9=00000000 R10=00000000 R11=deb3fe24

    R12=8004c6dc  SP=deb3fc24  Lr=8004c6dc Psr=6000001f

    Exception 'Prefetch Abort'(3) Thread-Id=023c0002(pth=ffffc1f4) PC=001ef028 BVA=00000000, dwInfo = 00000007

    R0=0000001e  R1=00000000  R2=001ab739  R3=001ab739

    R4=bb10818c  R5=0000002c  R6=00000004  R7=0000000c

    R8=8236db24  R9=8236f760 R10=00000000 R11=deb3fe24

    R12=80031ea0  SP=ffffc344  Lr=001ef02a Psr=20000093

    Exception 'Prefetch Abort' (3): Thread-Id=023c0002(pth=86c2f9b4), Proc-Id=00400002(pprc=82372308) 'NK.EXE', VM-active=057d0002(pprc=8c8fa5c4) 'explorer.exe'

    PC=001ef028(???+0x001ef028) RA=001ef02a(???+0x001ef02a) SP=ffffc344, BVA=001ef028

    Exception 'Prefetch Abort'(3) Thread-Id=06ce000a(pth=8ca39480) PC=8004c6dc BVA=00000000, dwInfo = 00000007

    R0=00000000  R1=0000fffc  R2=6000011f  R3=ffffc800

    R4=e0a0fb1c  R5=8ca39480  R6=00000000  R7=e0a0fb0c

    R8=00000002  R9=00000000 R10=00000000 R11=e0a0fd04

    R12=8004c6dc  SP=e0a0fb04  Lr=8004c6dc Psr=6000011f

    Exception 'Prefetch Abort'(3) Thread-Id=06ce000a(pth=ffffbfd8) PC=001efa13 BVA=00000000, dwInfo = 00000007

     

    Is this something you saw when you ran into the problem? Any more avdvice on this would be really useful.

     

    best regards,

    Rik A

     

  • Hi:

    I founded this problem too,and also post this problem on TI forum, but have not gotten any reply...

    This problem is caused by the changing of the CORE clock, the initial CORE clock is 200MHz which is set in the MLO. And if the DVFS wants to transit the power state to OPM0, the setting of the DPLL3 multiplier and divider would change, which cause the system hang.

    Maybe you could try to disable the change of CORE clock, to make sure we're facing the same problem. Than we can discuss later.

     

    If you want to disable the CORE clock change, do as follow:

    In your BSP "SRC\OAL\OALLIB\opp_map.c", SetOpp function

     

            if (opp > _rgOppVdd[vdd])

                {

                // transitioning to higher performance, change voltage first

                SetVoltageOpp(ppVoltDomain[opp]);

                    if ((vdd == kVDD1)&& (g_dwCpuFamily == CPU_FAMILY_DM37XX))

                        PrcmVoltScaleVoltageABB(opp);

                if(vdd!=kVDD2)SetFrequencyOpp(ppVoltDomain[opp]);         

                }

            else

                {

                // transitioning to lower performance, change frequency first

                if(vdd!=kVDD2)SetFrequencyOpp(ppVoltDomain[opp]); 

                SetVoltageOpp(ppVoltDomain[opp]);         

                    if ((vdd == kVDD1)&& (g_dwCpuFamily == CPU_FAMILY_DM37XX))

                        PrcmVoltScaleVoltageABB(opp);

                }

     

    Just add if(vdd!=kVDD2) before SetFrequencyOpp...

    After that, your system should work fine, but the CORE clock would not change and always stay at initial clock while the CORE voltage changing.

    Hope we can have some discussion after you test this...

     

  • Hi Changwei,

    We tried disabling the CORE clock change so only the VDD2 voltage is reduced for OPM0 but the platform is not stable when running like this.  Prefetch aborts are seen after a while.  Did you get any further with debugging this issue?

    We have tested with both 3730 and 3530 EVMs and see hangs on both with the v01.02.00 BSP at OPM0.  Interestingly though, the older BSquare 6.15 BSP runs fine at OPM0 on the EVM3530 and on another 3730 board we have here.

    If anyone knows what might have changed in the Combined / v01.02.00 BSP regarding DVFS/SmartReflex configuration that may point us to the cause of the issue with OPM0.  I have tried switching the 3730 build from using SmartReflex v2 back to v1 but that made no difference.  I cannot see anything else that has changed significantly since 6.15.

    Thanks,
    Mike

     

  • Just wanted to add my voice as we are seeing similar issues.

    We are running CE 7.0 (WEC7) on a custom 3503 board.
    Our BSP is based on 6.15.

    With DVFS enabled our device had a tendency to lock up randomly, sometimes after an hour of operation but in some cases after several days.

    After disabling DVFS (and keeping all other power management policies enabled) this has not happened for about a week, and with the number of devices we have used for testing I am starting to feel confident that DVFS is to blame.

    A JTAG debugger attached to a hung device reported "target in reset", which seems to indicate that it's not just a matter of the software having entered an infinite loop.

    I'll try to report back as we dig deeper into this.

    Cheers,
    Carsten

  • We have same issue on our platform (CE 6.0). I also tested to change only frequency and keeping voltage, but behavior is the same.