OMAP Timer 4 Virtual Addres not able to get using Windows CE BSP RRS feed

  • Question

  • Hi
    I am using the OMAP 3530 BSP. I am not able to get virtual address for Timer4 using MmmapIOSpace(). My  aim is to use the 2 timers to operate the stepper motor but I couldn't able to get the virtual address and because of this  i couldn't configure the timer.  I am trying this process in driver.

    I have used the following code to get the virtual address.
    OMAP_GPTIMER_REGS* g_pTimer4Regs;
    pa.QuadPart = OMAP_GPTIMER4_REGS_PA;
    g_pTimer4Regs = (OMAP_GPTIMER_REGS *)MmMapIoSpace(pa,
    if (g_pTimer4Regs == NULL)
    RETAILMSG(1,(TEXT("g_pTimer4Regs Address =
    0x%X\r\n"),&(g_pTimer4Regs->TIDR)) );
    RETAILMSG(1,(TEXT("g_pTimer4Regs = 0x%X\r\n"),(g_pTimer4Regs->TIDR)) );

    Here is the debug output
    g_pTimer4Regs Address = 0xD3956000
    Exception 'Data Abort' (4): Thread-Id=00a40002(pth=8af44c60),
    prc=85e31308) 'NK.EXE', VM-active=00c30006(pprc=8acc84a4) 'udevice.exe'
    PC=d3b5596c(stmotor.dll+0x0000596c) RA=d3b5596c(stmotor.dll+0x0000596c)
    c10, BVA=00000000
    Exception 'Raised Exception' (-1): Thread-Id=00a40002(pth=8af44c60),
    00002(pprc=85e31308) 'NK.EXE', VM-active=00c30006(pprc=8acc84a4) 'udevice.exe'
    PC=c003bc70(k.coredll.dll+0x0001bc70) RA=8402c4c8(kernel.dll+0x000064c8)
    e4ac, BVA=ffffffff

    FYI: Using the same code i can get the Virtual address for Timer1 and can retrieve the value.

    It is Kernel Mode Driver.


    Monday, June 7, 2010 6:51 AM

All replies

  • Did you check the value of OMAP_GPTIMER4_REGS_PA? Check that it's correct using the processor reference manual (it may be that a typo or a wrong offset lead to an incorrect address).

    Valter Minute
    Windows Embedded MVP
    Monday, June 7, 2010 9:13 AM
  • Hi Valter Minute

    Thanks for your reply

    I have checked it. The physical Address is written correctly and   it is mapped in address table.

    Monday, June 7, 2010 12:40 PM
  • Do you enable the clock of Timer4?
    And how do you activate the driver? Assume your driver on of the node under [HKLM\BuiltIn\...].
    The OMAP3530 BSP designs a platform specific root bus driver that controls the clock of builtin periperals.
    The root bus driver uses "MemBase" registry setting to identify the clock it need to enable, so you may try "MemBase"=dword:<OMAP_GPTIMER4_REGS_PA> in your driver setting and see if that works.

    Monday, June 7, 2010 11:46 PM
  • I think you might not have enabled the FCLK and ICLK clocks. Please check the data sheet and enable the same.


    Hope this may work for you.


    --- Misbah <><

    Friday, June 11, 2010 9:23 AM