We have to use the UART4 device of the am3517.
Out basic BSP is AM35x_BSP.
So we tried to modify it, but until now I does not work:
- in bsp_padcfg.h we have defined a new Group
#define UART4_PADS \
PAD_ENTRY(CCDC_FIELD,INPUT_DISABLED |MUXMODE(2)) \
PAD_ENTRY(CCDC_HD, INPUT_DISABLED |MUXMODE(2)) \
PAD_ENTRY(CCDC_VD, INPUT_ENABLED |PULL_RESISTOR_ENABLED|PULLUP_RESISTOR|MUXMODE(2)) \
PAD_ENTRY(CCDC_WEN, INPUT_ENABLED |PULL_RESISTOR_ENABLED|PULLUP_RESISTOR|MUXMODE(2))
- in bsp_padcfg.c we have added
const PAD_INFO UART4Pads[] = {UART4_PADS END_OF_PAD_ARRAY};
and
const PAD_INFO* BSPGetDevicePadInfo(OMAP_DEVICE device)
{ switch (device)
{ ...
case OMAP_DEVICE_UART4: return UART4Pads;
...
- in bsp_bootstubs.c we have added ( as UART4 is a core-device, like UART1 and 2 )
BOOL EnableDeviceClocks(UINT devId,BOOL bEnable)
{ OMAP_CM_REGS* pCmRegs;
switch (devId)
{ ...
case OMAP_DEVICE_UART4:
pCmRegs = OALPAtoUA(OMAP_PRCM_CORE_CM_REGS_PA);
if (bEnable)
{ SETREG32(&pCmRegs->CM_FCLKEN1_xxx,CM_CLKEN_UART4);
SETREG32(&pCmRegs->CM_ICLKEN1_xxx,CM_CLKEN_UART4);
while (INREG32(&pCmRegs->CM_IDLEST1_xxx) & CM_IDLEST_ST_UART4);
}
else
{ CLRREG32(&pCmRegs->CM_FCLKEN1_xxx,CM_CLKEN_UART4);
CLRREG32(&pCmRegs->CM_ICLKEN1_xxx,CM_CLKEN_UART4);
}
break;
...
- in EBOOT\main.c we have added
static VOID OEMPlatformDeinit()
{ ...
EnableDeviceClocks(OMAP_DEVICE_UART4,FALSE);
- in oem_latency.c we have added
BOOL OALWakeupLatency_DeviceEnabled( DWORD devId, BOOL bEnabled )
{ switch (devId)
{ ...
case OMAP_DEVICE_EFUSE:
case OMAP_DEVICE_UART4:
if (bEnabled == TRUE)
{ #ifdef DEBUG_PRCM_SUSPEND_RESUME
DeviceEnabledCount[devId]++;
#endif
++_coreDevice;
...
- in am3517_clocks.h we dont know what to do
Here IT IS NOT CLEAR, WHERE TO INCLUDE "OMAP_DEVICE_UART4" in the OMAP_DEVICE_ID enum.
We can not understand the comments like //---10--- if the enum value of that entry is 5.
Further it's not clear for us, how the entries are sorted ( are they sorted? ).
Please give us a hint for the right enum value for OMAP_DEVICE_UART4.
- in am3517_base_regs.h we have added
#define OMAP_UART4_REGS_PA 0x4809E000
- in uart.reg we have have included
IF BSP_OMAP_UART4
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\UART4]
...
"DeviceArrayIndex"=dword:4
"Index"=dword:4
...
"MemBase"=multi_sz:"4809E000"
...
ENDIF
all other entries are like for the uarts 1,2,3
- in our Catalog we have defined an entry
<BspItemId>abc:xyz:omapuart4_abc</BspItemId>
and
<Item Id="abc:xyz:omapuart4_abc">
<Title>UART4 driver</Title>
<Description>Omap UART driver</Description>
<Comment>Omap UART driver</Comment>
<Type>BspSpecific</Type>
<Variable>BSP_OMAP_UART4</Variable>
<Variable>BSP_OMAP_GPIO</Variable>
<Variable>BSP_OMAP_SDMA</Variable>
<Module>omap_uart.dll</Module>
<Location>Drivers\UART</Location>
</Item>
- in our project we have added
<Feature Name="Item" CatalogItemId="abc:xyz:omapuart4_abc" />
- in our platform.bib we have appended UART4:
; @CESYSGEN IF CE_MODULES_SERIAL
#if (defined BSP_OMAP_UART1 || defined BSP_OMAP_UART2 || defined BSP_OMAP_UART3 || defined BSP_OMAP_UART4)
omap_uart.dll $(_FLATRELEASEDIR)\omap_uart.dll NK SHK
#endif
; @CESYSGEN ENDIF CE_MODULES_SERIAL
Please assist us further with am3517_clocks.h.
Is there another place to pick into?
Best thanks
Hannes Brockmann