Home
W90N745 System Library User`s Manual
Contents
1. Winbond Electronics Corp W90N745 System Library User s Manual Preliminary Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp This page intentionally left blank Publication Release Date 06 14 2006 2 Revision 1 0 Preliminary E Winbond Electronics Corp CONTENTS W90N745 Supported C Library Functions Listing 0 0 5 sysGetTicks get current selected timer in ticks 2 0 cece cece teens 7 sysResetTicks reset the selected timer s tick count 1 0 0 0 ccc cc ccc cee eens 8 sysUpdateTickCount update selected timer s tick counter 0 0 0 0 ccc cece eee 9 sysSetTimerReferenceClock set timer reference clock 1 0 0 0 0 0 c ccc cece eee 0 sysStartTimer setup Own timer 0 0 0 AAAA EEEE EREE EEEE EEEE NAAA AS i sysStopTimer stop own timer 06 ea iin pi aA EA REE K ERA AA AAAA TAA 12 sysClearWatchDogTimerCount clear watch dog timer reset counter ununao 13 sysClearWatchDogTimerInterruptStatus clear watch dog timer interrupt status 14 sysDisableWatchDogTimer disable watch dog timer 0 0 ccc ccc eect eee nes 5 sysDisableWatchDogTimerReset disable watch dog timer reset function 6 sysEnableWatchDogTimer enable watch dog timer 0 0 0 cece eee 7 sysEnableWatchDogTimerReset enable watch dog timer reset function 8 sysInstallWa
2. sysStopTimer will stop Timer 0 or Timer 1 nTimeNo is used to select timer 0 or timer 1 After disabling timer this function will restore the interrupt service routine PARAMETER nTimeNo TIMERO TIMER1 RETURN VALUE Successful EXAMPLE Stop the timer 1 INT32 status status sysStopTimer TIMER1 Publication Release Date 06 14 2006 12 Revision 1 0 Preliminary Winbond NAME sysClearWatchDogTimerCount clear watch dog timer reset counter SYNOPSIS VOID sysClearWatchDogTimerCount VOID DESCRIPTION This function is used to clear watch dog timer reset count When interrupt occurred the system will reset after 1024 clock cycles Clear the reset counter the system will not be reset PARAMETER None RETURN VALUE None EXAMPLE sysClearWatchDogTimerCount 13 Publication Release Date 06 14 2006 Revision 1 0 Preliminary Winbond NAME sysClearWatchDogTimerInterruptStatus clear watch dog timer interrupt status SYNOPSIS VOID sysClearWatchDogTimerInterruptStatus V OID DESCRIPTION This function is used to clear watch dog timer interrupt status When interrupt occurred the watch dog timer interrupt flag will be set Clear this flag the interrupt will occur again PARAMETER None RETURN VALUE None EXAMPLE sysClearWatchDogTimerInterruptStatus Publication Release Date 06 14 2006 14 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysDisab
3. 0 and the lowest is 7 Use this function can change the priority level after install ISR PARAMETER intNo interrupt source number intLevel FIQ_LEVEL_0 IRQ LEVEL_1 IRQ _LEVEL_7 RETURN VALUE Successful or Fail EXAMPLE Change timer 0 priority to level 4 INT32 status status sysSetInterruptPriorityLevel 7 4 39 Publication Release Date 06 14 2006 Revision 1 0 Preliminary Winbond NAME sysSetInterruptT ype set interrupt source type SYNOPSIS INT32 sysSetInterruptT ype UINT32 intNo UINT32 intSourceType DESCRIPTION W90N745 has four kinds of interrupt source types They are low level sensitive high level sensitive negative edge trigger and positive edge trigger The default is high level sensitive This function is used to change the interrupt source type PARAMETER intNo interrupt source number intSourceType LOW_LEVEL_SENSITIVE HIGH_LEVEL_SENSITIVE NEGATIVE_EDGE_TRIGGER POSITIVE_EDGE_TRIGGER RETURN VALUE Successful or Fail EXAMPLE Change timer 0 source type to be positive edge trigger INT32 status status sysSetInterruptType 7 POSITTVE_EDGE_TRIGGER Publication Release Date 06 14 2006 40 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysSetLocalInterrupt enable disable CPSR interrupt SYNOPSIS INT32 sysSetLocalInterrupt INT32 intState DESCRIPTION The CPSR I bit and F bit need to be enabled or disabled when using interrupt T
4. 1 0 Winbond Electronics Corp Preliminary W90N745 Supported C Library Functions Listin Special C Library Functions 1 Timer sysGetTicks sysResetTicks sysUpdateTickCount sysSetTimerReferenceClock sysStartTimer sysStopTimer sysClearWatchDogTimerCount sysClearWatchDogTimerInterruptStatus sysDisableWatchDogTimer sysDisableWatchDogTimerReset sysEnableWatchDogTimer sysEnableWatchDogTimerReset sysInstallWatchDogTimerISR sysSetWatchDogTimerInterval sysSetTimerEvent sysClearTimerEvent sysSetLocalTime sysGetCurrentTime sysDelay 2 UART sysGetChar sysInitializeUART get current selected timer in ticks reset selected timer s tick counter update selected timer s tick counter set selected timer s reference clock setup own timer stop timer clear Watchdog timer reset counter clear Watchdog timer interrupt status disable Watchdog timer disable Watchdog timer reset function enable Watchdog timer enable Watchdog timer reset function setup own Watchdog timer ISR set Watchdog timer time out interval set event of selected timer clear event of selected timer set local time get current time which count by timer0 delay specific time which unit is 10ms get a character from UART Initializes the COM port sysPrintf sysprintf sysPutChar 3 AIC sysDisableInterrupt sysEnableInterrupt display message through RS 232 to terminal by interrupt mode display message through RS 232 to terminal by poll
5. Release Date 06 14 2006 18 Revision 1 0 Preliminary Winbond NAME sysInstallWatchDogTimerISR setup own watch dog timer interrupt service routine SYNOPSIS PVOID sysInstallWatchDogTimerISRUINT32 nIntTypeLevel PVOID pvNewISR DESCRIPTION This function is used to set up own watch dog timer interrupt service routine nIntTypeLevel is select interrupt to be FIQ or IRQ and level group 0 7 pvNewISR is the own interrupt service routine s pointer PARAMETER nIntTypeLevel FIQ_LEVEL_0 IRQ_LEVEL_1 IRQ _LEVEL_7 pvNewISR the pointer of watch dog timer interrupt service routine RETURN VALUE a pointer which point to old ISR EXAMPLE Set watch dog timer interrupt to be IRQ and group level 1 PVOID oldVect oldVect sysInstallWatchDogTimerISRURQ_LEVEL_1 myWatchDogISR 19 Publication Release Date 06 14 2006 Revision 1 0 Preliminary Winbond Electronics Corp NAME sysSetWatchDogTimerInterval set watch dog timer interval SYNOPSIS INT32 sysSetWatchDogTimerInterval INT32 nWdtInterval DESCRIPTION This function is used to set the watch dog timer interval The default is 0 5 minutes You can select interval to be 0 5 1 2 and 4 minutes PARAMETER nWadtlInterval WDT_INTERVAL_0 WDT_INTERVAL_1 WDT_INTERVAL_2 WDT_INTERVAL_3 The watch dog timer interval is shown as follows nWdtinterval pial Reset Timeout Real Time Interval WDT_INTERV
6. is used to select timer 0 or timer 1 The event function which indicated by uTimeEventNo shall be cleared PARAMETER nTimeNo TIMERO TIMER1 uTimeEventNo event number which want to clear RETURN VALUE None EXAMPLE clear event NO 5 sysClearTimerEvent TIMERO 5 Publication Release Date 06 14 2006 22 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysSetLocalTime set local time SYNOPSIS VOID sysSetLocalTime DateTime_T Itime DESCRIPTION This function is used to set local time time is a structure which contains year month day hour minute and second information PARAMETER Itime structure which contains the following information typedef struct datetime_t UINT32 year UINT32 mon UINT32 day UINT32 hour UINT32 min UINT32 sec DateTime_T RETURN VALUE None EXAMPLE set local time DateTime_T Timelnfo Timelnfo year 2006 TimeInfo mon 6 TimelInfo day 12 TimelInfo hour 9 TimelInfo min 0 TimelInfo sec 30 sysSetLocalTime TimelInfo 23 Publication Release Date 06 14 2006 Revision 1 0 E Winbond Electronics Corp NAME sysGetCurrentTime get current time SYNOPSIS Preliminary VOID sysGetCurrentTime DateTime_T curTime DESCRIPTION This function is used to get local time curTime is a structure pointer which contains year month day hour minute and second information PARAMETER curTime structure pointer whic
7. AL_0 214 clocks 214 1024 clocks 0 28 sec WDT_INTERVAL _ 1 216 clocks 2 1024 clocks 1 12 sec WDT_INTERVAL 2 218 clocks 218 1024 clocks 4 47 sec WDT_INTERVAL 3 2 clocks 27 1024 clocks 17 9 sec RETURN VALUE Successful EXAMPLE Set watch dog timer interval to WDT_INTERVAL_0 INT32 status status sysSetWatchDogTimerInterval WDT_INTERVAL_0O Publication Release Date 06 14 2006 20 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysSetTimerEvent set event of selected timer SYNOPSIS INT32 sysSetTimerEvent UINT32 nTimeNo UINT32 nTimeTick PVOID pvFun DESCRIPTION This function is used to set the event of selected timer nTimeNo is used to select timer O or timer 1 The event function which pointed by pvFun shall be executed after nTimeTick system timer tick PARAMETER nTimeNo TIMERO TIMER nTimeTick tick count before event executed pvFun event function pointer RETURN VALUE event number EXAMPLE Set event function hello after 100 tick INT nEventNo VOID hello VOID sysPrintf Hello World n nEventNo sysSetTimerEvent TIMERO 100 PVOID hello 21 Publication Release Date 06 14 2006 Revision 1 0 Preliminary Winbond NAME sysClearTimerEvent clear event of selected timer SYNOPSIS VOID sysClearTimerEvent UINT32 nTimeNo UINT32 uTimeEventNo DESCRIPTION This function is used to clear the event of selected timer nTimeNo
8. NAME sysGetTicks get current selected timer in ticks SYNOPSIS UINT32 sysGetTicks INT32 nTimeNo DESCRIPTION This function gets the Timer 0 or Timer 1 s current tick count PARAMETER nTimeNo TIMERO TIMER1 RETURN VALUE The current selected timer tick count EXAMPLE Get current timer 0 tick count UINT32 btime btime sysGetTicks TIMERO 7 Publication Release Date 06 14 2006 Revision 1 0 Preliminary C Winbond Electronics Corp NAME sysResetTicks reset the selected timer s tick count SYNOPSIS INT32 sysResetTicks INT32 nTimeNo DESCRIPTION This function used to reset Timer 0 or Timer 1 s global tick counter PARAMETER nTimeNo TIMERO TIMER1 RETURN VALUE Successful EXAMPLE Reset timer 0 tick count INT32 status status sysResetTicks TIMERO Publication Release Date 06 14 2006 8 Revision 1 0 Preliminary Winbond NAME sysUpdateTickCount update selected timer s tick counter SYNOPSIS INT32 sysUpdateTickCount INT32 nTimeNo UINT32 uCount DESCRIPTION This function used to update Timer 0 or Timer 1 s global tick counter PARAMETER nTimeNo TIMERO TIMER1 uCount tick counter value RETURN VALUE Successful EXAMPLE update timer 0 s tick counter as 3000 sysUpdateTickCount TIMERO 3000 9 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysSetTimerReferenceClock
9. T2 EXT3 extBaseAddr base address for external IO used extSize SIZE_256K SIZE_512K SIZE_1M SIZE_2M SIZE_4M SIZE_8M SIZE_16M SIZE_32M extBusWidth BUS_DISABLE BUS_BIT_8 BUS_BIT_16 BUS_BIT_32 RETURN VALUE None EXAMPLE Set external IO 0 base 0xCO000000 size 16M bus width 16 bit sysSetExternallO EXTO 0xC0000000 SIZE_16M BUS_BIT_16 47 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysSetExternallOTiming1 set up external IO access cycles SYNOPSIS VOID sysSetExternallOTiming1 INT extNo INT tACC INT tACS DESCRIPTION This function is used to change the access cycles and address set up time PARAMETER extNo EXTO EXT1 EXT2 EXT3 tACC Range is from 0x0 to OxF tACS Range is from 0x0 to 0x7 RETURN VALUE None EXAMPLE Set external IO 2 access cycles sysSetExternallOTiming1 EXT2 0x7 0x3 Publication Release Date 06 14 2006 48 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysSetExternallOTiming2 set up external IO chip selection time SYNOPSIS VOID sysSetExternallOTiming2 INT extNo INT tCOH INT tCOS DESCRIPTION This function is used to set up the chip selection hold on time and chip selection set up time PARAMETER extNo EXTO EXT1 EXT2 EXT3 tCOH Range is from 0x0 to 0x7 tCOS Range is from 0x0 to 0x7 RETURN VALUE None EXAMPLE Set external IO 1 hold on time sysSetE
10. _CLOCK uart uiBaudrate 115200 uart uiDataBits WB_DATA_BITS 8 uart uiStopBits WB_STOP_BITS_1 uart uiParity WB_PARITY_NONE uart uiRxTriggerLevel LEVEL_1_BYTE sysInitializeUART amp uart WB_UART_T uart Publication Release Date 06 14 2006 28 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysPrintf display message through RS232 to terminal by interrupt mode SYNOPSIS VOID sysPrintf PCHAR pcStr DESCRIPTION The function sends the specified str to the terminal through the RS 232 interface by interrupt mode PARAMETER peStr pointer of string which want to display RETURN VALUE None EXAMPLE sysPrintf Hello World n 29 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysprintf display message through RS232 to terminal by polling mode SYNOPSIS VOID sysPrintf PCHAR pcStr DESCRIPTION The function sends the specified str to the terminal through the RS 232 interface by polling mode PARAMETER peStr pointer of string which want to display RETURN VALUE None EXAMPLE sysprintf Hello World n Publication Release Date 06 14 2006 30 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysPutChar put a character out to UART SYNOPSIS VOID sysPutChar UCHAR ch DESCRIPTION The function sends the specified ch to the UART PARAMETER ch charac
11. d Electronics Corp NAME sysInitializeUART initialize the UART SYNOPSIS INT32 sysInitializeUART WB_UART uart DESCRIPTION WB_UART is the device initialization structure The definition is as following typedef struct UART_INIT_STRUCT UINT32 freq UINT32 baud_rate UINT32 data_bits UINT32 stop_bits UINT32 parity UINT32 rx_trigger_level WB_UART uart gt freq is UART reference clock Default is 15MHz If user have different reference clock used this parameter to change it uart gt baud_rate is used to set the COM port baud rate The range is from 9600 to 230400 The UART data bit can be 5 6 7 or 8 Use uart gt data_bits to set the suitable data bits The UART stop bit can be 1 or 2 Use uart gt stop_bits to set the suitable stop bits uart gt parity is used to set the suitable parity check uart gt rx_trigger_level is used to set the suitable trigger level PARAMETER uart gt data_bits WB_DATA BITS_5 WB_DATA BITS _ 8 uart gt stop_bits WB_STOP_BITS_1 WB_STOP_BITS_2 uart gt parity WB_PARITY_NONE WB_PARITY_ODD WB_PARITY_ EVEN uart gt rx_trigger_level LEVEL_1_ BYTE LEVEL_4 BYTES LEVEL_8_ BYTES LEVEL_14 BYTES RETURN VALUE Successful WB_INVALID_PARITY WB_INVALID_DATA_BITS WB_INVALID_STOP_BITS WB_INVALID_BAUD EXAMPLE WB_UART _T uart 27 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp uart uiFreq APB_SYSTEM
12. h contains the following information typedef struct datetime_t UINT32 year UINT32 mon UINT32 day UINT32 hour UINT32 min UINT32 Sec DateTime_T RETURN VALUE None EXAMPLE set local time DateTime_T Timelnfo sysGetCurrentTime TimelInfo Publication Release Date 06 14 2006 24 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysDelay delay specific time which unit is 10ms SYNOPSIS VOID sysDelay UINT32 uTicks DESCRIPTION This function is used to delay a specific period uTicks is the length of delay time which unit is ten milliseconds Please notice that the delay period has an extent of error which less than ten milliseconds PARAMETER uTicks delay period which unit is ten milliseconds RETURN VALUE None EXAMPLE delay 1s sysDelay 100 25 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysGetChar get a character from UART without echo SYNOPSIS CHAR sysGetChar VOID DESCRIPTION This function is user to obtain the next available character from the UART Nothing is echoed When no available characters are found the function waits until a character from UART is found PARAMETER None RETURN VALUE a character from UART EXAMPLE get user s input CHAR cUserInput cUserInput sysGetChar Publication Release Date 06 14 2006 26 Revision 1 0 aX Preliminary inbon
13. his function is used to enable disable I bit and F bit PARAMETER intState ENABLE_IRQ ENABLE _FIQ ENABLE _FIQ_ IRQ DISABLE_IRQ DISABLE_FIQ DISABLE_FIQ IRQ RETURN VALUE Successful EXAMPLE Enable I bit of CPSR INT32 state state sysSetLocalInterrupt ENABLE_IRQ 41 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysSetAIC2SW Mode set AIC to software mode SYNOPSIS INT32 sysSetAIC2SWMode VOID DESCRIPTION This function is used to set AIC as software mode When the system AIC in software mode the priority of each interrupt source shall be handled by software PARAMETER intState ENABLE_IRQ ENABLE_FIQ ENABLE_FIQ_IRQ DISABLE_IRQ DISABLE_FIQ DISABLE_FIQ_IRQ RETURN VALUE Successful EXAMPLE Set AIC as software mode sysSetAIC2SWMode Publication Release Date 06 14 2006 42 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysGetInterruptEnableStatus return interrupt source enable disable status SYNOPSIS UINT32 sysGetInterruptEnableStatus VOID DESCRIPTION This function is used to get the enable disable status of interrupt which save in AIC_IMR register PARAMETER None RETURN VALUE value of AIC_IMR register EXAMPLE Set AIC as software mode UINT32 uIMR Value uIMR Value sysGetInterruptEnableStatus 43 Publication Release Date 06 14 2006 Revision 1 0 E Winbond Elect
14. ing mode put a character into UART disable interrupt source of mask register enable interrupt source of mask register 5 Publication Release Date 06 14 2006 Revision 1 0 aN inbond Electronics Corp sysInstallExceptionHandler sysInstallFiqHandler sysInstallIrqHandler sysInstallISR sysSetGlobalInterrupt sysSetInterruptPriorityLevel sysSetInterruptT ype sysSetLocalInterrupt sysSetAIC2S WMode sysGetInterruptEnableStatus 4 Cache sysEnableCache sysDisableCache sysFlushCache 5 External IO sysSetExternallO sysSetExternallOTiming 1 sysSetExternallOTiming2 6 Power Management sysDisableAIIPM_IRQ sysEnablePM_IRQ sysPMStart Publication Release Date 06 14 2006 Revision 1 0 Preliminary setup own exception handler into interrupt vector table setup own Fiq handler into interrupt vector table setup own Irq handler into interrupt vector table setup own ISR into AIC interrupt table enable disable all interrupts set interrupt priority level set interrupt source type enable disable CPSR interrupts set AIC to software mode return specific interrupt source enable disable status enable system cache disable system cache flush system cache initial external IO control set up external IO access cycles set up external IO chip selection time Clean the PM IRQ status Save specific PM IRQ for wake up system Enter IDLE MIDLE PD power saving mode Preliminary E Winbond Electronics Corp
15. leWatchDogTimer disable watch dog timer SYNOPSIS VOID sysDisableWatchDogTimer VOID DESCRIPTION This function is used to disable watch dog timer PARAMETER None RETURN VALUE None EXAMPLE sysDisable WatchDogTimer 15 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysDisableWatchDogTimerReset disable watch dog timer reset function SYNOPSIS VOID sysDisableWatchDogTimerReset V OID DESCRIPTION This function is used to disable watch dog timer reset function PARAMETER None RETURN VALUE None EXAMPLE sysDisable WatchDogTimerReset Publication Release Date 06 14 2006 16 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysEnableWatchDogTimer enable watch dog timer SYNOPSIS VOID sysEnableWatchDogTimer VOID DESCRIPTION This function is used to enable watch dog timer PARAMETER None RETURN VALUE None EXAMPLE sysEnableWatchDogTimer 17 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysEnableWatchDogTimerReset enable watch dog timer reset function SYNOPSIS VOID sysEnableWatchDogTimerReset VOID DESCRIPTION This function is used to enable watch dog timer reset function The system will be reset when this function is enabled PARAMETER None RETURN VALUE None EXAMPLE sysEnableWatchDogTimerReset Publication
16. procedure according to the parameter pd_type Please notice that the sysPMStart function must not called in any ISR Besides this function will disable and flush cache before enter power saving mode since it uses system SRAM PARAMETER pd_type WB_PM_IDLE WB_PM_PD WB_PM_MIDLE RETURN VALUE Successful Operation finishes successfully WB_PM_PD_IRQ Fail Power down IRQ setting error WB_PM_Type_Fail Power saving type error EXAMPLE INT status status sysPMStart WB_PM_PD Publication Release Date 06 14 2006 52 Revision 1 0 Preliminary Winbond Electronics Corp CORPORATE HEADQUARTERS INFORMATION CONTACTS NO 9 Li Hsin Rd Hui Ping Chen Science Based Industrial Park Micro controller R amp D Division Dept II NS22 Hsinchu Taiwan R O C TEL 886 03 5678168 Ext 7980 TEL 886 03 5678168 E MAIL HPChen0 winbond com FAX 886 03 5665535 WWW http www winbond com tw Note All data and specifications are subject to change without notice 53 Publication Release Date 06 14 2006 Revision 1 0
17. r RETURN VALUE a pointer which point to old handler EXAMPLE Setup own software interrupt handler PVOID oldVect oldVect sysInstallExceptionHandler WB_SWI pNewS WIHandler Publication Release Date 06 14 2006 34 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysInstallFiqHandler setup own FIQ ISR into interrupt vector table SYNOPSIS PVOID sysInstallFiqHandler PVOID pNewISR DESCRIPTION Use this function to install FIQ handler into interrupt vector table PARAMETER pNewISR pointer of the new ISR handler RETURN VALUE a pointer which point to old ISR EXAMPLE Setup own FIQ handler PVOID oldVect oldVect sysInstallFiqHandler pNewFiqISR 35 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysInstallIrqHandler setup own IRQ ISR to interrupt vector table SYNOPSIS PVOID sysInstallIrqHandler PVOID pNewISR DESCRIPTION Use this function to install FIQ handler into interrupt vector table PARAMETER pNewISR pointer of the new ISR handler RETURN VALUE a pointer which point to old ISR EXAMPLE Setup own IRQ handler PVOID oldVect oldVect sysInstallIrqHandler pNewIrqISR Publication Release Date 06 14 2006 36 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysInstallISR setup own interrupt service routine to AIC interrupt vector table SYNOPSIS PVOID s
18. ronics Corp NAME sysEnableCache enable system cache SYNOPSIS VOID sysEnableCache VOID DESCRIPTION This function is used to enable cache PARAMETER None RETURN VALUE None EXAMPLE enable cache sysEnableCache Publication Release Date 06 14 2006 Revision 1 0 Preliminary Preliminary E Winbond Electronics Corp NAME sysDisableCache disable system cache SYNOPSIS VOID sysDisableCache VOID DESCRIPTION This function is used to disable cache PARAMETER None RETURN VALUE None EXAMPLE disabled cache sysDisableCache 45 Publication Release Date 06 14 2006 Revision 1 0 Preliminary Winbond NAME sysFlushCache flush system cache SYNOPSIS VOID sysFlushCache INT32 cacheType DESCRIPTION This function is used to flush system cache The parameter cacheType is used to select cache which needs to be flushed PARAMETER cacheT ype I_CACHE D_CACHE I_D_CACHE RETURN VALUE None EXAMPLE flush cache sysFlushCache I_D_CACHE Publication Release Date 06 14 2006 46 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysSetExternallO initial external IO control SYNOPSIS VOID sysSetExternallO INT extNo UINT32 extBaseAddr UINT32 extSize INT extBus Width DESCRIPTION This function is used to initial external IO control include setup base address size and bus width PARAMETER extNo EXTO EXT1 EX
19. set timer reference clock SYNOPSIS INT32 sysSetTimerReferenceClock UINT32 nTimeNo UINT32 uClockRate DESCRIPTION This function used to set the timer s reference clock The default reference clock is system clock 1S5MHz PARAMETER nTimeNo TIMERO TIMER1 uClockRate reference clock RETURN VALUE Successful EXAMPLE Set 20MHz to be timer 0 s reference clock INT32 status status sysSetTimerReferenceClock TIMERO 20000000 Publication Release Date 06 14 2006 10 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysStartTimer setup own timer SYNOPSIS INT32 sysStartTimer INT32 nTimeNo UINT32 uTicksPerSecond INT32 nOpMode DESCRIPTION sysStartTimer will start Timer 0 or Timer 1 nTimeNo is used to select timer 0 or timer 1 Because of W90N745 timer has three operation modes the nOpMode is used to set the operation mode uTicksPerSecond indicates that how many ticks per second PARAMETER nTimeNo TIMERO TIMER 1 nTickPerSecond tick number per second nOpMode ONE_SHOT_MODE PERIODIC_MODE TOGGLE_MODE RETURN VALUE Successful EXAMPLE Start the timer 1 and set it to periodic mode and 100 ticks per second INT32 status status sysStartTimer TIMER1 100 PERIODIC_MODE 11 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysStopTimer stop own timer SYNOPSIS INT32 sysStopTimer INT32 nTimeNo DESCRIPTION
20. tchDogTimerISR setup own watch dog timer interrupt service routine 9 sysSetWatchDogTimerInterval set watch dog timer interval 1 0 0 0 000 00 e cee eee 20 sysSetTimerEvent set event of selected timer 1 0 0 ieee eee eee eee eee 21 sysClearTimerEvent clear event of selected timer 0 00 c cece cece eee e eens 22 sysSetLocalTime set local time cpa ace repe Fe FOE BS OES PENI A NAGA AS bbe ek eee ees 23 sysGetCurrentTime get current time 0 1 cece eee enn e ee 24 sysDelay delay specific time which unit is 10ms 0 0000 eee eee eee 25 sysGetChar get a character from UART without echo 0 00 ccc cece eee teens 26 sysInitializeUART initialize the UART 0 0 eee eee 21 sysPrintf display message through RS232 to terminal by interrupt mode 29 sysprintf display message through RS232 to terminal by polling mode 30 sysPutChar put a character out to UART oera 0 0 eee eee eee 31 sysDisableInterrupt disable interrupt Source 6 kkk cere eee eens 32 sysEnableInterrupt enable interrupt SOUrCe 1 cette eens 33 sysInstallExceptionHandler setup own exception handler to interrupt vector table 34 sysInstallFiqHandler setup own FIQ ISR into interrupt vector table 00 00005 35 sysInstallIrqHandler setup own IRQ ISR to interrupt vector table 0 0 c eee eee 36 sysInstallISR se
21. ter which want to display RETURN VALUE None EXAMPLE sysPutChar A 31 Publication Release Date 06 14 2006 Revision 1 0 Preliminary Winbond NAME sysDisableInterrupt disable interrupt source SYNOPSIS INT32 sysDisableInterrupt UINT32 intNo DESCRIPTION This function is used to disable interrupt source PARAMETER intNo interrupt source number RETURN VALUE Successful or Fail EXAMPLE Disable timer 0 interrupt source number is 7 INT32 status status sysDisableInterrupt 7 Publication Release Date 06 14 2006 32 Revision 1 0 Preliminary Winbond NAME sysEnableInterrupt enable interrupt source SYNOPSIS INT32 sysEnableInterrupt UINT32 intNo DESCRIPTION This function is used to enable interrupt source PARAMETER intNo interrupt source number RETURN VALUE Successful or Fail EXAMPLE Enable timer 0 interrupt source number is 7 INT32 status status sysEnableInterrupt 7 33 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysInstallExceptionHandler setup own exception handler to interrupt vector table SYNOPSIS PVOID sysInstallExceptionHandler INT32 exceptType PVOID pNewHandler DESCRIPTION This function is used to install pNewHandler into exceptType exception PARAMETER exceptType WB_SWI WB_D_ABORT WB_I_ABORT WB_UNDEFINE pNewHandler pointer of the new handle
22. tup own interrupt service routine to AIC interrupt vector table 37 sysSetGlobalInterrupt enable disable all interrupts 0 000 c ccc cece eee eee 38 sysSetInterruptPriorityLevel set interrupt priority level nuunuu 39 sysSetInterruptType set interrupt source type 0 0 cece cette t ne eene 40 sysSetLocalInterrupt enable disable CPSR interrupt 0 0 0 0 0c c cece eee 4 sysSetAIC2SWMode set AIC to software mode 0000s 42 sysGetInterruptEnableStatus return interrupt source enable disable status 0 43 sysEnableCache enable system cache cient enn teens 44 sysDisableCache disable system cache 0 00 0 e eee e ened 45 sysFlushCache flush system cache lt suaa aanmanen aa aa EE E A A AaS 46 sysSetExternallO initial external IO control 2 0 0 0 0000s 47 sysSetExternallOTiming1 set up external IO access cycles nnn nnn ccc cee tees 48 3 Publication Release Date 06 14 2006 Revision 1 0 Preliminary Winbond Electronics Corp sysSetExternallOTiming2 set up external IO chip selection time 0 0000008 49 sysDisableAIIPM_IRQ Clean the PM IRQ status 2 0 cece cece eee eee 50 sysEnablePM_IRQ Save specific PM IRQ for wake up system 00 0 cece eee 51 sysPMStart Enter IDLE MIDLE PD power saving mode uoun 00 c cece eee neces 52 Publication Release Date 06 14 2006 4 Revision
23. xternallOTiming2 EXT1 0x3 0x3 49 Publication Release Date 06 14 2006 Revision 1 0 Preliminary C Winbond Electronics Corp NAME sysDisableAIIPM_IRQ Clean the PM IRQ status SYNOPSIS VOID sysDisableAIPM_IRQ VOID DESCRIPTION This function cleans the PM IRQ status The PM IRQ status records the specific IRQ source number which use to wake up system PARAMETER None RETURN VALUE None EXAMPLE Reset PM IRQ status sysDisableAIPM_IRQQ Publication Release Date 06 14 2006 50 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysEnablePM_IRQ Save specific PM IRQ for wake up system SYNOPSIS INT sysEnablePM_IRQ INT irg_no DESCRIPTION This function saves the PM IRQ status This status indicates the IRQ source numbers which need enable before system enter IDLE MIDLE PD mode On the other word user should use this function to save the specific IRQ source numbers which use to wake up system PARAMETER irq_no IRQ source number 0 31 RETURN VALUE Successful Operation finishes successfully WB_PM_INVALID_IRQ NUM IRQ source number is not correct EXAMPLE define IRQ KEYPAD 29 sysEnablePM_IRQURQ_KEYPAD use KPI to wake up system 51 Publication Release Date 06 14 2006 Revision 1 0 Preliminary C Winbond Electronics Corp NAME sysPMStart Enter IDLE MIDLE PD power saving mode SYNOPSIS INT sysPMStart INT pd_type DESCRIPTION This function starts PM
24. ysInstallISRUINT32 intTypeLevel INT32 intNo PVOID pNewISR PVOID pParam DESCRIPTION W90N745 interrupt group level is 0 7 Level 0 is FIQ and level 1 7 are IRQ The highest priority is 0 and the lowest priority is 7 Use this function to set up interrupt source intNo pNewISR handler to AIC interrupt vector table PARAMETER intTypeLevel FIQ_LEVEL_0 IRQ _LEVEL_1 IRQ _LEVEL_7 intNo interrupt source number pNewISR function pointer of new ISR pParam parameter for ISR RETURN VALUE a pointer which point to old ISR EXAMPLE Setup timer 0 handler PVOID oldVect oldVect sysInstallISRURQ_LEVEL_1 7 pTimerISR param 37 Publication Release Date 06 14 2006 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysSetGlobalInterrupt enable disable all interrupts SYNOPSIS INT32 sysSetGlobalInterrupt INT32 intState DESCRIPTION Enable disable all interrupt sources PARAMETER intState ENABLE_ALL_INTERRUPTS DISABLE_ALL_INTERRUPTS RETURN VALUE Successful EXAMPLE Disable all interrupt INT32 status status sysSetGlobalInterrupt DISABLE_ALL_INTERRUPTS Publication Release Date 06 14 2006 38 Revision 1 0 Preliminary E Winbond Electronics Corp NAME sysSetInterruptPriorityLevel set interrupt priority level SYNOPSIS INT32 sysSetInterruptPriorityLevel UINT32 intNo UINT32 intLevel DESCRIPTION W90N745 interrupt has 8 group levels The highest is
Download Pdf Manuals
Related Search
Related Contents
UP Plus 3D Printer User Manual SWFI PROLAC PUMP RCA 1103-1BKGA User's Guide MSP1000 ハイブリッドデジタルレコーダー 取扱説明書 TASKalfa 300i Mode d`emploi CopyPhot LG CU915 Data Sheet HP ProLiant ML330 Generation 3 Server Setup Copyright © All rights reserved.
Failed to retrieve file