background image

Copyright © 2011-2013

Texas Instruments Incorporated

ROM-TM4C123GH6PM-UG-750

ROM USER’S GUIDE

Tiva™ TM4C123GH6PM

Summary of Contents for Tiva TM4C123GH6PM

Page 1: ...Copyright 2011 2013 Texas Instruments Incorporated ROM TM4C123GH6PM UG 750 ROM USER S GUIDE Tiva TM4C123GH6PM...

Page 2: ...ands may be claimed as the property of others Please be aware that an important notice concerning availability standard warranty and use in critical applications of Texas Instruments semicon ductor pr...

Page 3: ...53 6 1 Introduction 53 6 2 Functions 54 7 CRC 69 7 1 Introduction 69 7 2 Functions 69 8 Flash 73 8 1 Introduction 73 8 2 Functions 73 9 Floating Point Unit FPU 81 9 1 Introduction 81 9 2 API Function...

Page 4: ...ule 223 19 1 Introduction 223 19 2 API Functions 223 20 System Tick SysTick 227 20 1 Introduction 227 20 2 Functions 227 21 Timer 231 21 1 Introduction 231 21 2 Functions 231 22 UART 249 22 1 Introduc...

Page 5: ...at helps to illustrate the arrangement of the tables ROM_APITABLE at 0x0100 0010 0 ROM_VERSION 1 pointer to ROM_UARTTABLE 2 pointer to ROM_SSITABLE 3 pointer to ROM_I2CTABLE 4 pointer to ROM_GPIOTABLE...

Page 6: ...ng driverlib rom h The API provided by the ROM can be utilized by any compiler so long as it complies with the Embedded Applications Binary Interface EABI which includes all recent compilers for the C...

Page 7: ...ere is a valid external crystal for USB operation as specified in the data sheet The LM Flash Programmer GUI can be used to download an application via the boot loader over the UART or USB interface o...

Page 8: ...I2C device The I2C interface can run at up to 400 KHz the maximum rate supported by the I2C protocol The boot loader uses an I2C slave address of 0x42 When an application calls back to the ROM based b...

Page 9: ...a to be received 4 Calculate the checksum of the data bytes and ensure that it matches the checksum received in the packet 5 Send an acknowledge ACK or not acknowledge NAK to the device to indicate th...

Page 10: ...crocontroller running the boot loader The format of the command is as follows uint8_t pui8Command 9 pui8Command 0 COMMAND_DOWNLOAD pui8Command 1 Program Address 31 24 pui8Command 2 Program Address 23...

Page 11: ...should only follow a COMMAND_DOWNLOAD com mand or another COMMAND_SEND_DATA command if more data is needed Consecutive send data commands automatically in crement the address and continue programming...

Page 12: ...ate mechanism allows the boot loader to either be called from a functioning application or from startup when no firmware has been downloaded to the microcontroller When the USB boot loader is called f...

Page 13: ...tors that the device requires for normal operation However it is not required to respond to any DFU class specific requests other than DFU_DETACH which indicates that it should switch to DFU mode The...

Page 14: ...ters DNLOAD_SYNC state after receiving a block of data and remains there until the data has been processed and a DFU_GETSTATUS request is received at which point the state changes to DNLOAD_IDLE DFU_C...

Page 15: ...D with a block of firmware image data State is ERROR Yes State is DNLOAD_SYNC or DNBUSY State is DNLOAD_IDLE More data to send No No Yes Yes Send DFU_DNLOAD with a zero length payload Report the error...

Page 16: ...ent to a device running the Tiva USB boot loader using a standard sequence of DFU_DNLOAD requests with no other embedded commands or device specific operations required An application which does under...

Page 17: ...d structure types defined in usbdfu h on big endian systems DFU_CMD_PROG This command is used to provide the USB boot loader with the address at which the next download should be written and the total...

Page 18: ...sses Data returned includes an 8 byte DFU_CMD_PROG prefix structure unless the prefix has been disabled by sending a DFU_CMD_BIN command with the bBinary parameter set to 1 The host should therefore b...

Page 19: ...to 0x00 pui8Data 2 Start Block Number 7 0 pui8Data 3 Start Block Number 15 8 pui8Data 4 Region Size 7 0 pui8Data 5 Region Size 15 8 pui8Data 6 Region Size 23 16 pui8Data 7 Region Size 31 24 DFU_CMD_E...

Page 20: ...MD_INFO command This is structure is returned in response to the first DFU_UPLOAD request following a DFU_CMD_INFO command Note that byte ordering of multi byte fields is little endian typedef struct...

Page 21: ...wnload operation completes and the host issues a USB reset to the DFU device The format of the command is as follows uint8_t pui8Data 8 pui8Data 0 DFU_CMD_RESET 0x07 pui8Data 1 Reserved set to 0x00 pu...

Page 22: ...Number in multiple languages The string table is optimized to not require that a string be provided for every language in case there is not a unique string for every language This is most likely the...

Page 23: ...tes 2 USB_DTYPE_STRING Language n Manufacturer Unicode String Language n Product string size in bytes 2 USB_DTYPE_STRING Language n Product Unicode String Language n Serial Number size in bytes 2 USB_...

Page 24: ...0 d 0 e 0 3 2 2 Size of Serial Number USB_DTYPE_STRING 1 0 1 0 0 0 0 uint8_t pui8USBBootROMInfo 0xbe 0x1c TI VID 0xff 0x00 Tiva DFU PID 0x00 0x02 USB version 2 0 0x00 0mA of Bus power 0xC0 Self powere...

Page 25: ...0 C 0 o 0 m 0 p 0 a 0 n 0 y 0 s 0 25 2 2 Size of Product String USB_DTYPE_STRING Actualizacion de Firmware A 0 c 0 t 0 u 0 a 0 l 0 i 0 z 0 a 0 c 0 i 0 o 0 n 0 0 d 0 e 0 0 F 0 i 0 r 0 m 0 w 0 a 0 r 0 e...

Page 26: ...Boot Loader 26 April 8 2013...

Page 27: ...ble the third is the forward polynomial table and the final is the reverse polynomial table The meanings of these tables and their use can be found in the AES code provided in TivaWare 3 2 Data Struct...

Page 28: ...used by the XySSL AES implementation ucReverseSBox This table contains the reverse S Box as defined by the AES standard This is simply the reverse of ucForwardSBox ulReverseTable This table contains t...

Page 29: ...r example 4 2 Functions Functions void ROM_ComparatorConfigure uint32_t ui32Base uint32_t ui32Comp uint32_t ui32Config void ROM_ComparatorIntClear uint32_t ui32Base uint32_t ui32Comp void ROM_Comparat...

Page 30: ...OMP_INT_HIGH to generate an interrupt when the comparator output is high COMP_INT_LOW to generate an interrupt when the comparator output is low COMP_INT_FALL to generate an interrupt when the compara...

Page 31: ...errupt source be cleared early in the interrupt handler as opposed to the very last action to avoid returning from the interrupt handler before the interrupt source is actually cleared Failure to do s...

Page 32: ...d to the processor Returns None 4 2 1 5 ROM_ComparatorIntStatus Gets the current interrupt status Prototype bool ROM_ComparatorIntStatus uint32_t ui32Base uint32_t ui32Comp bool bMasked ROM Location R...

Page 33: ...EF_0_825V to set the reference voltage to 0 825 V COMP_REF_0_928125V to set the reference voltage to 0 928125 V COMP_REF_0_9625V to set the reference voltage to 0 9625 V COMP_REF_1_03125V to set the r...

Page 34: ...ion ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_COMPARATORTABLE is an array of pointers located at ROM_APITABLE 6 ROM_ComparatorValueGet is a function pointer located at ROM_COMPAR...

Page 35: ...le to starve the lower priority sequences Hardware oversampling of the ADC data is available for improved accuracy An oversampling fac tor of 2x 4x 8x 16x 32x and 64x is supported but reduces the thro...

Page 36: ...um void ROM_ADCSequenceUnderflowClear uint32_t ui32Base uint32_t ui32SequenceNum 5 2 1 Function Documentation 5 2 1 1 ROM_ADCComparatorConfigure Configures an ADC digital comparator Prototype void ROM...

Page 37: ...can take on the following values ADC_COMP_INT_NONE to never generate ADC interrupt ADC_COMP_INT_LOW_ALWAYS to always generate ADC interrupt when ADC output is in the low band ADC_COMP_INT_LOW_ONCE to...

Page 38: ...nterrupts status to clear Description The specified interrupt status is cleared Returns None 5 2 1 3 ROM_ADCComparatorIntDisable Disables a sample sequence comparator interrupt Prototype void ROM_ADCC...

Page 39: ...tion enables the requested sample sequence comparator interrupt Returns None 5 2 1 5 ROM_ADCComparatorIntStatus Gets the current comparator interrupt status Prototype uint32_t ROM_ADCComparatorIntStat...

Page 40: ...ined as any ADC value less than or equal to the ui32LowRef value mid band is defined as any ADC value greater than the ui32LowRef value but less than or equal to the ui32HighRef value high band is def...

Page 41: ...eraged Description This function configures the hardware oversampling for the ADC which can be used to provide better resolution on the sampled data Oversampling is accomplished by averaging multiple...

Page 42: ...arly in the interrupt handler as opposed to the very last action to avoid returning from the interrupt handler before the interrupt source is actually cleared Failure to do so may result in the interr...

Page 43: ...Gets the current interrupt status Prototype uint32_t ROM_ADCIntStatus uint32_t ui32Base uint32_t ui32SequenceNum bool bMasked ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010...

Page 44: ...SE_247_5 ADC_PHASE_270 ADC_PHASE_292_5 ADC_PHASE_315 or ADC_PHASE_337_5 5 2 1 14 ROM_ADCPhaseDelaySet Sets the phase delay between a trigger and the start of a sequence Prototype void ROM_ADCPhaseDela...

Page 45: ...TABLE 13 Parameters ui32Base is the base address of the ADC module ui32SequenceNum is the sample sequence number with ADC_TRIGGER_WAIT or ADC_TRIGGER_SIGNAL optionally ORed into it Description This fu...

Page 46: ...e ADC module ui32Ref is the reference to use Description The ADC reference is set as specified by ui32Ref It must be one of ADC_REF_INT or ADC_REF_EXT_3V for internal or external reference If ADC_REF_...

Page 47: ...second analog comparator config ured with ROM_ComparatorConfigure ADC_TRIGGER_COMP2 A trigger generated by the third analog comparator configured with ROM_ComparatorConfigure ADC_TRIGGER_EXTERNAL A t...

Page 48: ...ware FIFO are copied into the buffer which is assumed to be large enough to hold that many samples This will only return the samples that are presently available which may not be the entire sample seq...

Page 49: ...nce must be configured before it is enabled Returns None 5 2 1 22 ROM_ADCSequenceOverflow Determines if a sample sequence overflow occurred Prototype int32_t ROM_ADCSequenceOverflow uint32_t ui32Base...

Page 50: ...ow condition it otherwise causes no harm Returns None 5 2 1 24 ROM_ADCSequenceStepConfigure Configure a step of the sample sequencer Prototype void ROM_ADCSequenceStepConfigure uint32_t ui32Base uint3...

Page 51: ...range from zero to seven for the first sample sequence from zero to three for the second and third sample sequence and can only be zero for the fourth sample sequence Differential mode only works wit...

Page 52: ...array of pointers located at 0x0100 0010 ROM_ADCTABLE is an array of pointers located at ROM_APITABLE 5 ROM_ADCSequenceUnderflowClear is a function pointer located at ROM_ADCTABLE 12 Parameters ui32B...

Page 53: ...ROM_CANBitTimingSet function should be called with the ap propriate bit timing values for the CAN bus Once these two functions have been called a CAN con troller can be enabled using the ROM_CANEnable...

Page 54: ...ts are enabled the handler will be invoked whenever a CAN interrupt is triggered The handler can determine which condition caused the interrupt by using the ROM_CANIntStatus function Multiple conditio...

Page 55: ...bAutoRetry uint32_t ROM_CANStatusGet uint32_t ui32Base tCANStsReg eStatusReg 6 2 1 Function Documentation 6 2 1 1 ROM_CANBitRateSet This function is used to set the CAN bit timing values to a nominal...

Page 56: ...an array of pointers located at 0x0100 0010 ROM_CANTABLE is an array of pointers located at ROM_APITABLE 18 ROM_CANBitTimingGet is a function pointer located at ROM_CANTABLE 5 Parameters ui32Base is...

Page 57: ...ne quantum in duration and is added to derive the correct duration of Prop_Seg and Phase1_Seg The equation to determine the actual bit rate is as follows CAN Clock ui32SyncPropPhase1Seg ui32Phase2Seg...

Page 58: ...rrCntrGet Reads the CAN controller error counter register Prototype bool ROM_CANErrCntrGet uint32_t ui32Base uint32_t pui32RxCount uint32_t pui32TxCount ROM Location ROM_APITABLE is an array of pointe...

Page 59: ...ed values and must be cleared prior to enabling the CAN controller the first time This prevents unwanted transmission or reception of data before the message objects are configured This function must...

Page 60: ...ndler before the interrupt source is actually cleared Failure to do so may result in the interrupt handler being immediately reentered because the interrupt controller still sees the interrupt source...

Page 61: ...rrupts CAN_INT_MASTER must be enabled Further for any particular transaction from a message object to generate an interrupt that message object must have interrupts enabled see ROM_CANMessageSet CAN_I...

Page 62: ...terrupt handler can read the interrupt status again to make sure all pending interrupts are cleared before returning from the interrupt CAN_INT_STS_OBJECT returns a bit mask indicating which message o...

Page 63: ...ta consists of all of the parts of a CAN message plus some control and status information Normally this is used to read a message object that has received and stored a CAN message with a certain ident...

Page 64: ...receive message object MSG_OBJ_TYPE_RX_REMOTE CAN receive remote request message object MSG_OBJ_TYPE_RXTX_REMOTE CAN remote frame receive remote then transmit message object The message object pointed...

Page 65: ...as no data is present at the time of the call 7 Call this function with ui32ObjID set to one of the 32 object buffers If you specify a message object buffer that already contains a message definition...

Page 66: ...cation ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_CANTABLE is an array of pointers located at ROM_APITABLE 18 ROM_CANStatusGet is a function pointer located at ROM_CANTABLE 8 Para...

Page 67: ...t mode CAN_STATUS_LEC_CRC CRC error in received message The remaining status registers are 32 bit bit maps to the message objects They can be used to quickly obtain information about the status of all...

Page 68: ...Controller Area Network CAN 68 April 8 2013...

Page 69: ...RC on a stream of data that is coming in via a serial link for example The CRC 16 APIs implement the standard CRC 16 polynomial also known as CRC 16 IBM x16 x15 x2 1 The CRC 8 CCITT API implements the...

Page 70: ...not need to be supplied all at once If the input buffer contains the entire block of data then ui16Crc should be set to 0 If however the entire block of data is not available then ui16Crc should be s...

Page 71: ...OM_Crc16Array3 uint32_t ui32WordLen uint32_t pui32Data uint16_t pui16Crc3 ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_SOFTWARETABLE is an array of pointers located at...

Page 72: ...ts CRC 8 CCITT computed does not need to be supplied all at once If the input buffer contains the entire block of data then ui8Crc should be set to 0 If however the entire block of data is not availab...

Page 73: ...lash controller In order to do this the flash controller must know the clock rate of the system in order to be able to time the number of micro seconds certain signals are asserted The number of clock...

Page 74: ...y and execute only blocks cannot be erased This function will not return until the block has been erased Returns Returns 0 on success or 1 if an invalid block address was specified or the block is wri...

Page 75: ...is an array of pointers located at ROM_APITABLE 7 ROM_FlashIntDisable is a function pointer located at ROM_FLASHTABLE 11 Parameters ui32IntFlags is a bit mask of the interrupt sources to be disabled C...

Page 76: ...his returns the interrupt status for the flash controller Either the raw interrupt status or the status of interrupts that are allowed to reflect to the processor can be returned Returns The current i...

Page 77: ...located at 0x0100 0010 ROM_FLASHTABLE is an array of pointers located at ROM_APITABLE 7 ROM_FlashProtectGet is a function pointer located at ROM_FLASHTABLE 4 Parameters ui32Address is the start addres...

Page 78: ...the block Can be one of FlashReadWrite FlashReadOnly or FlashExecuteOnly Description This function will set the protection for the specified 2 kB block of flash Blocks which are read write can be mad...

Page 79: ...TABLE is an array of pointers located at 0x0100 0010 ROM_FLASHTABLE is an array of pointers located at ROM_APITABLE 7 ROM_FlashUserSave is a function pointer located at ROM_FLASHTABLE 9 Description Th...

Page 80: ...SER Register 0 ui32User1 is the value to store in USER Register 1 Description This function will set the contents of the user registers 0 and 1 to the specified values Returns Returns 0 on success or...

Page 81: ...o be performed inside interrupt handlers without any special precautions at the expense of increased stack usage for the floating point context and increased interrupt latency due to the additional wr...

Page 82: ...ROM_FPUDisable void ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_FPUTABLE is an array of pointers located at ROM_APITABLE 26 ROM_FPUDisable is a function pointer locat...

Page 83: ...er FPU_FLUSH_TO_ZERO_DIS or FPU_FLUSH_TO_ZERO_EN Description This function enables or disables the flush to zero mode of the floating point unit When dis abled the default the floating point unit is f...

Page 84: ...ated at ROM_APITABLE 26 ROM_FPULazyStackingEnable is a function pointer located at ROM_FPUTABLE 4 Description This function enables the lazy stacking of floating point registers s0 s15 when an interru...

Page 85: ...esults Prototype void ROM_FPURoundingModeSet uint32_t ui32Mode ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_FPUTABLE is an array of pointers located at ROM_APITABLE 26...

Page 86: ...ROM_FPUStackingEnable void ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_FPUTABLE is an array of pointers located at ROM_APITABLE 26 ROM_FPUStackingEnable is a function...

Page 87: ...ions can operate on more than one GPIO pin within a single module at a time The ui8Pins parameter to these functions is used to specify the pins that are affected the GPIO pins whose corresponding bit...

Page 88: ...put uint32_t ui32Port uint8_t ui8Pins void ROM_GPIOPinTypeGPIOOutputOD uint32_t ui32Port uint8_t ui8Pins void ROM_GPIOPinTypeI2C uint32_t ui32Port uint8_t ui8Pins void ROM_GPIOPinTypeI2CSCL uint32_t u...

Page 89: ...le is a function pointer located at ROM_GPIOTABLE 33 Parameters ui32Port is the base address of the GPIO port ui8Pins is the bit packed representation of the pin s Description This function enables a...

Page 90: ...address of the GPIO port ui8Pins is the bit packed representation of the pin s ui32PinIO is the pin direction and or mode Description This function will set the specified pin s on the selected GPIO po...

Page 91: ...this feature if it was enabled via a call to GPIODMATriggerEn able Returns None 10 2 1 6 ROM_GPIODMATriggerEnable Enables a GPIO pin as a trigger to start a DMA transaction Prototype void ROM_GPIODMA...

Page 92: ...ted interrupt or it can be configured as a low level or high level detected interrupt The type of interrupt detection mechanism is returned as an enumerated data type Returns Returns one of the enumer...

Page 93: ...ure that the GPIO inputs remain stable for the duration of this function Returns None 10 2 1 9 ROM_GPIOPadConfigGet Gets the pad configuration for a pin Prototype void ROM_GPIOPadConfigGet uint32_t ui...

Page 94: ...ecifies the output drive strength ui32PinType specifies the pin type Description This function sets the drive strength and type for the specified pin s on the selected GPIO port For pin s configured a...

Page 95: ...M_GPIOPinConfigure is a function pointer located at ROM_GPIOTABLE 26 Parameters ui32PinConfig is the pin configuration value specified as only one of the GPIO_P _ values Description This function conf...

Page 96: ...3 ROM_GPIOPinTypeADC Configures pin s for use as analog to digital converter inputs Prototype void ROM_GPIOPinTypeADC uint32_t ui32Port uint8_t ui8Pins ROM Location ROM_APITABLE is an array of pointer...

Page 97: ...ard setup for example using the on chip pull ups The pin s are specified using a bit packed byte where each bit that is set identifies the pin to be accessed and where bit 0 of the byte represents GPI...

Page 98: ..._t ui8Pins ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_GPIOTABLE is an array of pointers located at ROM_APITABLE 4 ROM_GPIOPinTypeGPIOInput is a function pointer locat...

Page 99: ...OOutputOD Configures pin s for use as GPIO open drain outputs Prototype void ROM_GPIOPinTypeGPIOOutputOD uint32_t ui32Port uint8_t ui8Pins ROM Location ROM_APITABLE is an array of pointers located at...

Page 100: ...not be used to turn any pin into an I2C pin it only configures an I2C pin for proper operation Returns None 10 2 1 20 ROM_GPIOPinTypeI2CSCL Configures pin s for use as SCL by the I2C peripheral Protot...

Page 101: ...tation of the pin s Description The PWM pins must be properly configured for the PWM peripheral to function correctly This function provides a typical configuration for those pin s other configuration...

Page 102: ...y pin into a QEI pin it only configures a QEI pin for proper operation Returns None 10 2 1 23 ROM_GPIOPinTypeSSI Configures pin s for use by the SSI peripheral Prototype void ROM_GPIOPinTypeSSI uint32...

Page 103: ...of the pin s Description The CCP pins must be properly configured for the timer peripheral to function correctly This function provides a typical configuration for those pin s other configurations ma...

Page 104: ...in it only configures a UART pin for proper operation Returns None 10 2 1 26 ROM_GPIOPinTypeUSBAnalog Configures pin s for use by the USB peripheral Prototype void ROM_GPIOPinTypeUSBAnalog uint32_t ui...

Page 105: ...or the USB peripheral to function correctly This function provides a typical configuration for the digital USB pin s other configurations may work as well depending upon the board setup for example us...

Page 106: ...is the bit packed representation of the pin s ui8Val is the value to write to the pin s Description Writes the corresponding bit values to the output pin s specified by ui8Pins Writing to a pin confi...

Page 107: ...order to use the RTC feature of the Hibernation module the RTC must be enabled by calling ROM_HibernateRTCEnable It can be later disabled by calling ROM_HibernateRTCDisable These functions can be call...

Page 108: ...heckDone void void ROM_HibernateBatCheckStart void void ROM_HibernateClockConfig uint32_t ui32Config void ROM_HibernateDataGet uint32_t pui32Data uint32_t ui32Count void ROM_HibernateDataSet uint32_t...

Page 109: ...2 1 2 ROM_HibernateBatCheckStart Forces the Hibernation module to initiate a check of the battery voltage Prototype void ROM_HibernateBatCheckStart void ROM Location ROM_APITABLE is an array of point...

Page 110: ...with a crystal HIBERNATE_OSC_LOWDRIVE specifies a lower drive strength when a 12pF filter capac itor is used with a crystal The HIBERNATE_OSC_DISABLE option is used to disable and power down the inter...

Page 111: ...ROM_HIBERNATETABLE 18 Parameters pui32Data points to the data that the caller wants to store in the memory of the Hibernation module ui32Count is the count of 32 bit words to store Description Stores...

Page 112: ...Enables the Hibernation module for operation This function should be called before any of the Hibernation module features are used The peripheral clock is the same as the processor clock This is the...

Page 113: ...immediately reentered because the interrupt controller still sees the interrupt source asserted Returns None 11 2 1 9 ROM_HibernateIntDisable Disables interrupts for the Hibernation module Prototype...

Page 114: ...ernateIntStatus Gets the current interrupt status of the Hibernation module Prototype uint32_t ROM_HibernateIntStatus bool bMasked ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0...

Page 115: ...ese combinations of functions can be used by the software to determine if the processor is waking from hibernation and the appropriate action to take as a result Returns Returns true if the module is...

Page 116: ...nation mode Prototype void ROM_HibernateRequest void ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_HIBERNATETABLE is an array of pointers located at ROM_APITABLE 19 ROM_...

Page 117: ...ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_HIBERNATETABLE is an array of pointers located at ROM_APITABLE 19 ROM_HibernateRTCDisable is a function pointer located at ROM_HIBERNATE...

Page 118: ...the real time clock RTC counter Prototype void ROM_HibernateRTCSet uint32_t ui32RTCValue ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_HIBERNATETABLE is an array of poin...

Page 119: ...Get is a function pointer located at ROM_HIBERNATETABLE 17 Description Gets the value of the pre divider trim register This function can be used to get the current value of the trim register prior to...

Page 120: ...7 Description Returns the flags representing the wake configuration for the Hibernation module The return value is a combination of the following flags HIBERNATE_WAKE_PIN wake when the external wake p...

Page 121: ...Hibernation Module HIBERNATE_WAKE_PIN wake when the external wake pin is asserted HIBERNATE_WAKE_RTC wake when one of the RTC matches occurs Returns None April 8 2013 121...

Page 122: ...Hibernation Module 122 April 8 2013...

Page 123: ...I2CMasterInitExpClk That function will set the bus speed and enable the master module The user may transmit or receive data after the successful initialization of the I2C master module Data is transfe...

Page 124: ...MasterBusy uint32_t ui32Base void ROM_I2CMasterControl uint32_t ui32Base uint32_t ui32Cmd uint32_t ROM_I2CMasterDataGet uint32_t ui32Base void ROM_I2CMasterDataPut uint32_t ui32Base uint8_t ui8Data vo...

Page 125: ...C bus is busy otherwise returns false 12 2 1 2 ROM_I2CMasterBusy Indicates whether or not the I2C Master is busy Prototype bool ROM_I2CMasterBusy uint32_t ui32Base ROM Location ROM_APITABLE is an arra...

Page 126: ...SEND_CONT I2C_MASTER_CMD_BURST_SEND_FINISH I2C_MASTER_CMD_BURST_SEND_ERROR_STOP I2C_MASTER_CMD_BURST_RECEIVE_START I2C_MASTER_CMD_BURST_RECEIVE_CONT I2C_MASTER_CMD_BURST_RECEIVE_FINISH I2C_MASTER_CMD_...

Page 127: ...mitted from the I2C Master Description This function will place the supplied data into I2C Master Data Register Returns None 12 2 1 6 ROM_I2CMasterDisable Disables the I2C master block Prototype void...

Page 128: ...OM_I2CMasterErr uint32_t ui32Base ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_I2CTABLE is an array of pointers located at ROM_APITABLE 3 ROM_I2CMasterErr is a function...

Page 129: ...call to ROM_SysCtlClockGet Returns None 12 2 1 10 ROM_I2CMasterIntClear Clears I2C Master interrupt sources Prototype void ROM_I2CMasterIntClear uint32_t ui32Base ROM Location ROM_APITABLE is an arra...

Page 130: ...ableEx Note Because there is a write buffer in the Cortex M4 processor it may take several clock cycles before the interrupt source is actually cleared Therefore it is recommended that the interrupt s...

Page 131: ...bles the indicated I2C Master interrupt sources Only the sources that are enabled can be reflected to the processor interrupt disabled sources have no effect on the processor The ui32IntFlags paramete...

Page 132: ...processor The ui32IntFlags parameter is the logical OR of any of the following I2C_MASTER_INT_TIMEOUT Clock Timeout interrupt I2C_MASTER_INT_DATA Data interrupt Returns None 12 2 1 16 ROM_I2CMasterInt...

Page 133: ...for the I2C Master module Either the raw interrupt status or the status of interrupts that are allowed to reflect to the processor can be returned Returns Returns the current interrupt status enumera...

Page 134: ...s will indicate that the I2C Master is initiating a read from the slave otherwise the address will indicate that the I2C Master is initiating a write to the slave Returns None 12 2 1 20 ROM_I2CMasterT...

Page 135: ...cated at ROM_APITABLE 3 ROM_UpdateI2C is a function pointer located at ROM_I2CTABLE 24 Description Calling this function commences an update of the firmware via the I2C0 interface This function assume...

Page 136: ...Inter Integrated Circuit I2C 136 April 8 2013...

Page 137: ...before lower priority interrupts as well as allowing preemption of lower priority interrupt handlers by higher prior ity interrupts Again this helps reduce interrupt response time for example a 1 ms s...

Page 138: ...M_INTERRUPTTABLE is an array of pointers located at ROM_APITABLE 14 ROM_IntDisable is a function pointer located at ROM_INTERRUPTTABLE 3 Parameters ui32Interrupt specifies the interrupt to be disabled...

Page 139: ...ion This function checks if the specified interrupt is enabled in the interrupt controller Returns A non zero value if the interrupt is enabled 13 2 1 4 ROM_IntMasterDisable Disables the processor int...

Page 140: ...tion was called or false if they were initially enabled 13 2 1 6 ROM_IntPendClear Unpends an interrupt Prototype void ROM_IntPendClear uint32_t ui32Interrupt ROM Location ROM_APITABLE is an array of p...

Page 141: ...interrupt handler has completed execution The interrupt must have been enabled for it to be called Returns None 13 2 1 8 ROM_IntPriorityGet Gets the priority of an interrupt Prototype int32_t ROM_IntP...

Page 142: ...cated at ROM_APITABLE 14 ROM_IntPriorityGroupingSet is a function pointer located at ROM_INTERRUPTTABLE 4 Parameters ui32Bits specifies the number of bits of preemptable priority Description This func...

Page 143: ...of pointers located at 0x0100 0010 ROM_INTERRUPTTABLE is an array of pointers located at ROM_APITABLE 14 ROM_IntPriorityMaskSet is a function pointer located at ROM_INTERRUPTTABLE 10 Parameters ui32P...

Page 144: ...ed simultaneously the ones with the highest priority are processed before the lower priority in terrupts Smaller numbers correspond to higher interrupt priorities priority 0 is the highest interrupt p...

Page 145: ...ured A region that is defined by ROM_MPURegionSet can be initially enabled or disabled If the region is not initially enabled it can be enabled later by calling ROM_MPURegionEnable An enabled region c...

Page 146: ...on void ROM_MPURegionEnable uint32_t ui32Region void ROM_MPURegionGet uint32_t ui32Region uint32_t pui32Addr uint32_t pui32Flags void ROM_MPURegionSet uint32_t ui32Region uint32_t ui32Addr uint32_t ui...

Page 147: ...efined If this option is not enabled then there must be at least one valid region already defined when the MPU is enabled MPU_CONFIG_HARDFLT_NMI enables the MPU while in a hard fault or NMI exception...

Page 148: ...enabled again by calling ROM_MPURegionEnable Returns None 14 2 1 5 ROM_MPURegionEnable Enables a specific region Prototype void ROM_MPURegionEnable uint32_t ui32Region ROM Location ROM_APITABLE is an...

Page 149: ...et function The region s enable state is preserved in the attributes that are saved Returns None 14 2 1 7 ROM_MPURegionSet Sets up the access rules for a specific region Prototype void ROM_MPURegionSe...

Page 150: ...GN_SIZE_16M MPU_RGN_SIZE_32M MPU_RGN_SIZE_64M MPU_RGN_SIZE_128M MPU_RGN_SIZE_256M MPU_RGN_SIZE_512M MPU_RGN_SIZE_1G MPU_RGN_SIZE_2G MPU_RGN_SIZE_4G The execute permission flag must be one of the follo...

Page 151: ...region can be initially enabled or disabled with one of the following flags MPU_RGN_ENABLE MPU_RGN_DISABLE As an example to set a region with the following attributes size of 32 KB execution en abled...

Page 152: ...Memory Protection Unit MPU 152 April 8 2013...

Page 153: ...rity control Synchronization Fault handling Interrupt status When discussing the various components of the PWM module the following conventions are used The four generator blocks are called Gen0 Gen1...

Page 154: ...d void ROM_PWMGenIntTrigDisable uint32_t ui32Base uint32_t ui32Gen uint32_t ui32IntTrig void ROM_PWMGenIntTrigEnable uint32_t ui32Base uint32_t ui32Gen uint32_t ui32IntTrig uint32_t ROM_PWMGenPeriodGe...

Page 155: ...dEnable uint32_t ui32Base uint32_t ui32Gen uint16_t ui16Rise uint16_t ui16Fall ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_PWMTABLE is an array of pointers located at...

Page 156: ...cause there is a write buffer in the Cortex M4 processor it may take several clock cycles before the interrupt source is actually cleared Therefore it is recommended that the interrupt source be clear...

Page 157: ...red Failure to do so may result in the interrupt handler being immediately reentered because the interrupt controller still sees the interrupt source asserted Returns None 15 2 1 5 ROM_PWMGenConfigure...

Page 158: ...OR of the follow ing PWM_GEN_MODE_DOWN or PWM_GEN_MODE_UP_DOWN to specify the counting mode PWM_GEN_MODE_SYNC or PWM_GEN_MODE_NO_SYNC to specify the counter load and comparator update synchronization...

Page 159: ...function blocks the PWM clock from driving the timer counter for the specified generator block Returns None 15 2 1 7 ROM_PWMGenEnable Enables the timer counter for a PWM generator block Prototype voi...

Page 160: ...WM_FAULT_GROUP_0 or PWM_FAULT_GROUP_1 ui32FaultTriggers is the set of fault triggers which are to be cleared Description This function allows an application to clear the fault triggers for a given PWM...

Page 161: ...le on devices supporting extended PWM fault handling Returns None 15 2 1 10 ROM_PWMGenFaultStatus Returns the current state of the fault triggers for a given PWM generator Prototype uint32_t ROM_PWMGe...

Page 162: ...ers located at 0x0100 0010 ROM_PWMTABLE is an array of pointers located at ROM_APITABLE 8 ROM_PWMGenFaultTriggerGet is a function pointer located at ROM_PWMTABLE 26 Parameters ui32Base is the base add...

Page 163: ..._FAULT0 PWM_FAULT_FAULT1 PWM_FAULT_FAULT2 or PWM_FAULT_FAULT3 For PWM_FAULT_GROUP_1 this is the logical OR of PWM_FAULT_DCMP0 PWM_FAULT_DCMP1 PWM_FAULT_DCMP2 PWM_FAULT_DCMP3 PWM_FAULT_DCMP4 PWM_FAULT_...

Page 164: ...he Cortex M4 processor it may take several clock cycles before the interrupt source is actually cleared Therefore it is recommended that the interrupt source be cleared early in the interrupt handler...

Page 165: ...s a function pointer located at ROM_PWMTABLE 15 Parameters ui32Base is the base address of the PWM module ui32Gen is the PWM generator to have interrupts and triggers disabled Must be one of PWM_GEN_0...

Page 166: ...NT_BU or PWM_TR_CNT_BD Returns None 15 2 1 17 ROM_PWMGenPeriodGet Gets the period of a PWM generator block Prototype uint32_t ROM_PWMGenPeriodGet uint32_t ui32Base uint32_t ui32Gen ROM Location ROM_AP...

Page 167: ...here the period of the generator block is defined as the number of PWM clock ticks between pulses on the generator block zero signal Note Any subsequent calls made to this function before an update oc...

Page 168: ...the interrupts to be enabled Must be a logical OR of any of PWM_INT_GEN_0 PWM_INT_GEN_1 PWM_INT_GEN_2 PWM_INT_GEN_3 PWM_INT_FAULT0 PWM_INT_FAULT1 PWM_INT_FAULT2 or PWM_INT_FAULT3 Description Unmasks t...

Page 169: ...R of any of PWM_OUT_0_BIT PWM_OUT_1_BIT PWM_OUT_2_BIT PWM_OUT_3_BIT PWM_OUT_4_BIT PWM_OUT_5_BIT PWM_OUT_6_BIT or PWM_OUT_7_BIT bFaultSuppress determines if the signal is suppressed or passed through d...

Page 170: ...driven high or low The affected outputs are selected using the parameter ui32PWMOutBits The parameter bDriveHigh determines the output level for the pins identi fied by ui32PWMOutBits If bDriveHigh is...

Page 171: ...e uint32_t ui32PWMOutBits bool bEnable ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_PWMTABLE is an array of pointers located at ROM_APITABLE 8 ROM_PWMOutputState is a f...

Page 172: ...PWM clock ticks Returns Returns the width of the pulse in PWM clock ticks 15 2 1 27 ROM_PWMPulseWidthSet Sets the pulse width for the specified PWM output Prototype void ROM_PWMPulseWidthSet uint32_t...

Page 173: ...nction synchronizes the time base of the generator blocks by causing the specified generator counters to be reset to zero Returns None 15 2 1 29 ROM_PWMSyncUpdate Synchronizes all pending updates Prot...

Page 174: ...Pulse Width Modulator PWM Returns None 174 April 8 2013...

Page 175: ...first channel or edges on both channels can be counted counting edges on both channels provides higher encoder resolution if required In either mode the input signals can be swapped before being proce...

Page 176: ...located at ROM_APITABLE 9 ROM_QEIConfigure is a function pointer located at ROM_QEITABLE 3 Parameters ui32Base is the base address of the quadrature encoder module ui32Config is the configuration for...

Page 177: ...oder module Description This returns the current direction of rotation In this case current means the most recently detected direction of the encoder it may not be presently moving but this is the dir...

Page 178: ...d before it is enabled See also ROM_QEIConfigure Returns None 16 2 1 5 ROM_QEIErrorGet Gets the encoder error indicator Prototype bool ROM_QEIErrorGet uint32_t ui32Base ROM Location ROM_APITABLE is an...

Page 179: ...ke several clock cycles before the interrupt source is actually cleared Therefore it is recommended that the interrupt source be cleared early in the interrupt handler as opposed to the very last acti...

Page 180: ...ags is a bit mask of the interrupt sources to be enabled Can be any of the QEI_INTERROR QEI_INTDIR QEI_INTTIMER or QEI_INTINDEX values Description Enables the indicated quadrature encoder interrupt so...

Page 181: ...e address of the quadrature encoder module Description This returns the current position of the encoder Depending upon the configuration of the encoder and the incident of an index pulse this value ma...

Page 182: ...one of QEI_VELDIV_1 QEI_VELDIV_2 QEI_VELDIV_4 QEI_VELDIV_8 QEI_VELDIV_16 QEI_VELDIV_32 QEI_VELDIV_64 or QEI_VELDIV_128 ui32Period specifies the number of clock ticks over which to measure the velocity...

Page 183: ...ase is the base address of the quadrature encoder module Description This will enable operation of the velocity capture in the quadrature encoder module It must be configured before it is enabled Velo...

Page 184: ...mber of pulses detected in the specified time period this number can be multiplied by the number of time periods per second and divided by the number of pulses per revolution to obtain the number of r...

Page 185: ...rate clock divider and prescaler to generate the output serial clock derived from the SSI module s input clock Bit rates are generated based on the input clock and the maximum bit rate supported by t...

Page 186: ...nsmitter hard ware If false is returned then the transmit FIFO is empty and all bits of the last transmitted word have left the hardware shift register Returns Returns true if the SSI is transmitting...

Page 187: ...possible clock source are the system clock SSI_CLOCK_SYSTEM or the precision internal oscillator SSI_CLOCK_PIOSC Changing the baud clock source will change the data rate generated by the SSI Therefore...

Page 188: ...arameter defines the operating mode of the SSI module The SSI mod ule can operate as a master or slave if a slave the SSI can be configured to disable out put on its serial output line The ui32Mode pa...

Page 189: ...a data element from the SSI receive FIFO Prototype int32_t ROM_SSIDataGetNonBlocking uint32_t ui32Base uint32_t pui32Data ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_S...

Page 190: ...here N is the data width as configured by ROM_SSIConfigSetExpClk For example if the interface is configured for 8 bit data width the upper 24 bits of ui32Data are discarded Returns None 17 2 1 8 ROM_S...

Page 191: ...ROM_SSITABLE 3 Parameters ui32Base specifies the SSI module base address Description This function disables operation of the synchronous serial interface Returns None 17 2 1 10 ROM_SSIDMADisable Disab...

Page 192: ...the DMA features to enable Description The specified SSI DMA features are enabled The SSI can be configured to use DMA for transmit and or receive data transfers The ui32DMAFlags parameter is the log...

Page 193: ...The specified SSI interrupt sources are cleared so that they no longer assert This function must be called in the interrupt handler to keep the interrupts from being recognized again immediately upon...

Page 194: ...ntEnable Enables individual SSI interrupt sources Prototype void ROM_SSIIntEnable uint32_t ui32Base uint32_t ui32IntFlags ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_S...

Page 195: ...e raw interrupt status or the status of interrupts that are allowed to reflect to the processor can be returned Returns The current interrupt status enumerated as a bit field of SSI_TXFF SSI_RXFF SSI_...

Page 196: ...Synchronous Serial Interface SSI 196 April 8 2013...

Page 197: ...run mode clock configuration and the processor no longer executes code and is no longer clocked An interrupt will return the device to run mode from one of the sleep modes the sleep modes are entered...

Page 198: ...alDisable uint32_t ui32Peripheral void ROM_SysCtlPeripheralEnable uint32_t ui32Peripheral void ROM_SysCtlPeripheralPowerOff uint32_t ui32Peripheral void ROM_SysCtlPeripheralPowerOn uint32_t ui32Periph...

Page 199: ...nt32_t ui32Speed ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_SYSCTLTABLE is an array of pointers located at ROM_APITABLE 13 ROM_SysCtlADCSpeedSet is a function pointer...

Page 200: ...of pointers located at ROM_APITABLE 13 ROM_SysCtlClockSet is a function pointer located at ROM_SYSCTLTABLE 23 Parameters ui32Config is the required configuration of the device clocking Description Thi...

Page 201: ...ne of the SYSCTL_XTAL_xxx values Note If selecting the PLL as the system clock source that is via SYSCTL_USE_PLL this function will poll the PLL lock interrupt to determine when the PLL has locked If...

Page 202: ...g values SYSCTL_DSLP_DIV_1 SYSCTL_DSLP_DIV_2 SYSCTL_DSLP_DIV_3 SYSCTL_DSLP_DIV_64 The oscillator source is chosen with one of the following values SYSCTL_DSLP_OSC_MAIN SYSCTL_DSLP_OSC_INT SYSCTL_DSLP_...

Page 203: ...e of the flash Returns The total number of bytes of flash 18 2 1 9 ROM_SysCtlIntClear Clears system control interrupt sources Prototype void ROM_SysCtlIntClear uint32_t ui32Ints ROM Location ROM_APITA...

Page 204: ...0 0010 ROM_SYSCTLTABLE is an array of pointers located at ROM_APITABLE 13 ROM_SysCtlIntDisable is a function pointer located at ROM_SYSCTLTABLE 14 Parameters ui32Ints is a bit mask of the interrupt so...

Page 205: ...tion pointer located at ROM_SYSCTLTABLE 16 Parameters bMasked is false if the raw interrupt status is required and true if the masked interrupt status is required Description This returns the interrup...

Page 206: ...cation ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_SYSCTLTABLE is an array of pointers located at ROM_APITABLE 13 ROM_SysCtlPeripheralClockGating is a function pointer located at R...

Page 207: ...t be only one of the follow ing values SYSCTL_PERIPH_ADC0 SYSCTL_PERIPH_ADC1 SYSCTL_PERIPH_CAN0 SYSCTL_PERIPH_CAN1 SYSCTL_PERIPH_CAN2 SYSCTL_PERIPH_COMP0 SYSCTL_PERIPH_COMP1 SYSCTL_PERIPH_COMP2 SYSCTL...

Page 208: ...L_PERIPH_ADC0 SYSCTL_PERIPH_ADC1 SYSCTL_PERIPH_CAN0 SYSCTL_PERIPH_CAN1 SYSCTL_PERIPH_CAN2 SYSCTL_PERIPH_COMP0 SYSCTL_PERIPH_COMP1 SYSCTL_PERIPH_COMP2 SYSCTL_PERIPH_EEPROM0 SYSCTL_PERIPH_GPIOA SYSCTL_P...

Page 209: ...2C4 SYSCTL_PERIPH_I2C5 SYSCTL_PERIPH_PWM0 SYSCTL_PERIPH_PWM1 SYSCTL_PERIPH_QEI0 SYSCTL_PERIPH_QEI1 SYSCTL_PERIPH_SSI0 SYSCTL_PERIPH_SSI1 SYSCTL_PERIPH_SSI2 SYSCTL_PERIPH_SSI3 SYSCTL_PERIPH_TIMER0 SYSC...

Page 210: ...PH_UART3 SYSCTL_PERIPH_UART4 SYSCTL_PERIPH_UART5 SYSCTL_PERIPH_UART6 SYSCTL_PERIPH_UART7 SYSCTL_PERIPH_UDMA SYSCTL_PERIPH_USB0 SYSCTL_PERIPH_WDOG0 SYSCTL_PERIPH_WDOG1 SYSCTL_PERIPH_WTIMER0 SYSCTL_PERI...

Page 211: ...PERIPH_WDOG0 SYSCTL_PERIPH_WDOG1 SYSCTL_PERIPH_WTIMER0 SYSCTL_PERIPH_WTIMER1 SYSCTL_PERIPH_WTIMER2 SYSCTL_PERIPH_WTIMER3 SYSCTL_PERIPH_WTIMER4 or SYSCTL_PERIPH_WTIMER5 Returns None 18 2 1 20 ROM_SysCt...

Page 212: ...located at ROM_APITABLE 13 ROM_SysCtlPeripheralPresent is a function pointer located at ROM_SYSCTLTABLE 4 Parameters ui32Peripheral is the peripheral in question Description Determines if a particular...

Page 213: ...PERIPH_COMP1 SYSCTL_PERIPH_COMP2 SYSCTL_PERIPH_EEPROM0 SYSCTL_PERIPH_GPIOA SYSCTL_PERIPH_GPIOB SYSCTL_PERIPH_GPIOC SYSCTL_PERIPH_GPIOD SYSCTL_PERIPH_GPIOE SYSCTL_PERIPH_GPIOF SYSCTL_PERIPH_HIBERNATE S...

Page 214: ...IOE SYSCTL_PERIPH_GPIOF SYSCTL_PERIPH_HIBERNATE SYSCTL_PERIPH_I2C0 SYSCTL_PERIPH_I2C1 SYSCTL_PERIPH_I2C2 SYSCTL_PERIPH_I2C3 SYSCTL_PERIPH_I2C4 SYSCTL_PERIPH_I2C5 SYSCTL_PERIPH_PWM0 SYSCTL_PERIPH_PWM1...

Page 215: ..._GPIOA SYSCTL_PERIPH_GPIOB SYSCTL_PERIPH_GPIOC SYSCTL_PERIPH_GPIOD SYSCTL_PERIPH_GPIOE SYSCTL_PERIPH_GPIOF SYSCTL_PERIPH_HIBERNATE SYSCTL_PERIPH_I2C0 SYSCTL_PERIPH_I2C1 SYSCTL_PERIPH_I2C2 SYSCTL_PERIP...

Page 216: ...IPH_GPIOE SYSCTL_PERIPH_GPIOF SYSCTL_PERIPH_HIBERNATE SYSCTL_PERIPH_I2C0 SYSCTL_PERIPH_I2C1 SYSCTL_PERIPH_I2C2 SYSCTL_PERIPH_I2C3 SYSCTL_PERIPH_I2C4 SYSCTL_PERIPH_I2C5 SYSCTL_PERIPH_PWM0 SYSCTL_PERIPH...

Page 217: ...h 0x40 being the nominal value in other words if everything were perfect this would provide exactly 16 MHz Val ues larger than 0x40 will slow down PIOSC and values smaller than 0x40 will speed up PIOS...

Page 218: ...he PWM is dependent upon the system clock rate as configured by ROM_SysCtlClockSet Returns None 18 2 1 29 ROM_SysCtlReset Resets the device Prototype void ROM_SysCtlReset void ROM Location ROM_APITABL...

Page 219: ...eared after they are retrieved with ROM_SysCtlResetCauseGet Returns None 18 2 1 31 ROM_SysCtlResetCauseGet Gets the reason for a reset Prototype uint32_t ROM_SysCtlResetCauseGet void ROM Location ROM_...

Page 220: ...ROM_SysCtlSRAMSizeGet void ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_SYSCTLTABLE is an array of pointers located at ROM_APITABLE 13 ROM_SysCtlSRAMSizeGet is a functi...

Page 221: ...s located at 0x0100 0010 ROM_SYSCTLTABLE is an array of pointers located at ROM_APITABLE 13 ROM_SysCtlUSBPLLEnable is a function pointer located at ROM_SYSCTLTABLE 31 Description This function will en...

Page 222: ...System Control 222 April 8 2013...

Page 223: ...OM_SysExcIntClear uint32_t ui32IntFlags ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_SYSEXCTABLE is an array of pointers located at ROM_APITABLE 30 ROM_SysExcIntClear i...

Page 224: ...stem exception interrupt sources Prototype void ROM_SysExcIntDisable uint32_t ui32IntFlags ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_SYSEXCTABLE is an array of point...

Page 225: ...NT_FP_OFC Floating point overflow exception interrupt SYSEXCP_INT_FP_UFC Floating point underflow exception interrupt SYSEXCP_INT_FP_IOC Floating point invalid operation interrupt SYSEXCP_INT_FP_DZC F...

Page 226: ...urns Returns the current system exception interrupt status enumerated as the logical OR of SYSEXCP_INT_FP_IXC SYSEXCP_INT_FP_OFC SYSEXCP_INT_FP_UFC SY SEXCP_INT_FP_IOC SYSEXCP_INT_FP_DZC and SYSEXCP_I...

Page 227: ...able void void ROM_SysTickEnable void void ROM_SysTickIntDisable void void ROM_SysTickIntEnable void uint32_t ROM_SysTickPeriodGet void void ROM_SysTickPeriodSet uint32_t ui32Period uint32_t ROM_SysTi...

Page 228: ...s not automatically reloaded with the period as specified in a previous call to ROM_SysTickPeriodSet If an immediate reload is required the NVIC_ST_CURRENT register must be written to force this Any w...

Page 229: ...one automatically by NVIC when the interrupt handler is called Returns None 20 2 1 5 ROM_SysTickPeriodGet Gets the period of the SysTick counter Prototype uint32_t ROM_SysTickPeriodGet void ROM Locati...

Page 230: ...an immediate reload is required the NVIC_ST_CURRENT register must be written Any write to this register clears the SysTick counter to 0 and will cause a reload with the ui32Period supplied here on the...

Page 231: ...a Pulse Width Modulation PWM generator When configured for event capture the timer acts as a counter It can be configured to either count the time between events or it can count the events themselves...

Page 232: ...uint32_t ui32Base uint32_t ui32Timer void ROM_TimerPrescaleMatchSet uint32_t ui32Base uint32_t ui32Timer uint32_t ui32Value void ROM_TimerPrescaleSet uint32_t ui32Base uint32_t ui32Timer uint32_t ui3...

Page 233: ...NE_SHOT_UP Half width one shot timer that counts up instead of down not available on all parts TIMER_CFG_A_PERIODIC Half width periodic timer TIMER_CFG_A_PERIODIC_UP Half width periodic timer that cou...

Page 234: ...n ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_TIMERTABLE is an array of pointers located at ROM_APITABLE 11 ROM_TimerControlLevel is a function pointer located at ROM_TIMERTABLE 4...

Page 235: ...rns None 21 2 1 5 ROM_TimerControlTrigger Enables or disables the trigger output Prototype void ROM_TimerControlTrigger uint32_t ui32Base uint32_t ui32Timer bool bEnable ROM Location ROM_APITABLE is a...

Page 236: ...for a trigger input to start counting When enabled the previous timer in the trigger chain must count to its timeout in order for this timer to start counting Refer to the data sheet for a descriptio...

Page 237: ...rns None 21 2 1 9 ROM_TimerIntClear Clears timer interrupt sources Prototype void ROM_TimerIntClear uint32_t ui32Base uint32_t ui32IntFlags ROM Location ROM_APITABLE is an array of pointers located at...

Page 238: ...0x0100 0010 ROM_TIMERTABLE is an array of pointers located at ROM_APITABLE 11 ROM_TimerIntDisable is a function pointer located at ROM_TIMERTABLE 20 Parameters ui32Base is the base address of the tim...

Page 239: ..._TIMEOUT Timer A timeout interrupt Returns None 21 2 1 12 ROM_TimerIntStatus Gets the current interrupt status Prototype uint32_t ROM_TimerIntStatus uint32_t ui32Base bool bMasked ROM Location ROM_API...

Page 240: ...he specified timer Note This function can be used for both full and half width modes of 16 32 bit timers and for half width modes of 32 64 bit timers Use ROM_TimerLoadGet64 for full width modes of 32...

Page 241: ...d value Description This function sets the timer load value if the timer is running then the value is immediately loaded into the timer Note This function can be used for both full and half width mode...

Page 242: ...MER_B Only TIMER_A should be used when the timer is configured for full width operation Description This function gets the match value for the specified timer Note This function can be used for both f...

Page 243: ...timer s to adjust must be one of TIMER_A TIMER_B or TIMER_BOTH Only TIMER_A should be used when the timer is configured for full width operation ui32Value is the match value Description This function...

Page 244: ...nt32_t ROM_TimerPrescaleGet uint32_t ui32Base uint32_t ui32Timer ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_TIMERTABLE is an array of pointers located at ROM_APITABLE...

Page 245: ...escaleMatchSet uint32_t ui32Base uint32_t ui32Timer uint32_t ui32Value ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_TIMERTABLE is an array of pointers located at ROM_AP...

Page 246: ...nd 65535 inclusive for 32 64 bit timers Description This function sets the value of the input clock prescaler The prescaler is only operational when in half width mode and is used to extend the range...

Page 247: ...i32Base uint32_t ui32Timer ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_TIMERTABLE is an array of pointers located at ROM_APITABLE 11 ROM_TimerValueGet is a function po...

Page 248: ...f pointers located at 0x0100 0010 ROM_TIMERTABLE is an array of pointers located at ROM_APITABLE 11 ROM_TimerValueGet64 is a function pointer located at ROM_TIMERTABLE 25 Parameters ui32Base is the ba...

Page 249: ...tion Programmable serial interface 5 6 7 or 8 data bits even odd stick or no parity bit generation and detection 1 or 2 stop bit generation baud rate generation from DC to processor clock 16 IrDA seri...

Page 250: ...se uint32_t ui32IntFlags void ROM_UARTIntDisable uint32_t ui32Base uint32_t ui32IntFlags void ROM_UARTIntEnable uint32_t ui32Base uint32_t ui32IntFlags uint32_t ROM_UARTIntStatus uint32_t ui32Base boo...

Page 251: ...ui8Mask ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_UARTTABLE is an array of pointers located at ROM_APITABLE 1 ROM_UART9BitAddrSet is a function pointer located at RO...

Page 252: ...ray of pointers located at 0x0100 0010 ROM_UARTTABLE is an array of pointers located at ROM_APITABLE 1 ROM_UART9BitEnable is a function pointer located at ROM_UARTTABLE 33 Parameters ui32Base is the b...

Page 253: ...ed at ROM_UARTTABLE 26 Parameters ui32Base is the base address of the UART port Description Allows the caller to determine whether all transmitted bytes have cleared the transmitter hard ware If false...

Page 254: ...O for the specified port Returns Returns the character read from the specified port cast as a int32_t A 1 is returned if there are no characters present in the receive FIFO The ROM_UARTCharsAvail func...

Page 255: ...is returned and the application must retry the function later Returns Returns true if the character was successfully placed in the transmit FIFO or false if there was no space available in the transm...

Page 256: ...kSourceSet Sets the baud clock source for the specified UART Prototype void ROM_UARTClockSourceSet uint32_t ui32Base uint32_t ui32Source ROM Location ROM_APITABLE is an array of pointers located at 0x...

Page 257: ...baud rate it may not be the exact baud rate requested or an official baud rate The data format returned in pui32Config is enumerated the same as the ui32Config parameter of ROM_UARTConfigSetExpClk The...

Page 258: ..._PAR_ZERO select the parity mode no parity bit even parity bit odd parity bit parity bit always one and parity bit always zero respectively The peripheral clock is the same as the processor clock This...

Page 259: ...ble uint32_t ui32Base uint32_t ui32DMAFlags ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_UARTTABLE is an array of pointers located at ROM_APITABLE 1 ROM_UARTDMADisable...

Page 260: ...an error occurs The ui32DMAFlags parameter is the logical OR of any of the following values UART_DMA_RX enable DMA for receive UART_DMA_TX enable DMA for transmit UART_DMA_ERR_RXSTOP disable DMA recei...

Page 261: ...SIREN control bit for IrDA mode on the UART If the bLowPower flag is set then SIRLP bit will also be set Returns None 22 2 1 22 ROM_UARTFIFODisable Disables the transmit and receive FIFOs Prototype v...

Page 262: ...ion ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_UARTTABLE is an array of pointers located at ROM_APITABLE 1 ROM_UARTFIFOLevelGet is a function pointer located at ROM_UARTTABLE 4 Pa...

Page 263: ...2 2 1 26 ROM_UARTIntClear Clears UART interrupt sources Prototype void ROM_UARTIntClear uint32_t ui32Base uint32_t ui32IntFlags ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010...

Page 264: ...located at ROM_UARTTABLE 18 Parameters ui32Base is the base address of the UART port ui32IntFlags is the bit mask of the interrupt sources to be disabled Description Disables the indicated UART interr...

Page 265: ...TS CTS interrupt UART_INT_RI RI interrupt Returns None 22 2 1 29 ROM_UARTIntStatus Gets the current interrupt status Prototype uint32_t ROM_UARTIntStatus uint32_t ui32Base bool bMasked ROM Location RO...

Page 266: ..._CONFIG_PAR_ONE or UART_CONFIG_PAR_ZERO 22 2 1 31 ROM_UARTParityModeSet Sets the type of parity Prototype void ROM_UARTParityModeSet uint32_t ui32Base uint32_t ui32Parity ROM Location ROM_APITABLE is...

Page 267: ...ne 22 2 1 33 ROM_UARTRxErrorGet Gets current receiver errors Prototype uint32_t ROM_UARTRxErrorGet uint32_t ui32Base ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_UARTTA...

Page 268: ...nt operating mode for the UART transmit interrupt Prototype uint32_t ROM_UARTTxIntModeGet uint32_t ui32Base ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_UARTTABLE is an...

Page 269: ...lt the transmit interrupt is asserted when the FIFO level falls past a threshold set via a call to ROM_UARTFIFOLevelSet Alternatively if this function is called with ui32Mode set to UART_TXINT_MODE_EO...

Page 270: ...UART 270 April 8 2013...

Page 271: ...ral different transfer modes allowing for complex transfer schemes The following transfer modes are provided Basic mode performs a simple transfer when request is asserted by a device This is ap propr...

Page 272: ...d you must tell it where to find the channel control structures in system memory This is done by using the function ROM_uDMAControlBaseSet and passing a pointer to the base of the channel control stru...

Page 273: ...r alternate control structure For Basic and Auto transfer modes only the primary control structure is needed The alternate control structure is only needed for complex transfer modes of Ping pong or S...

Page 274: ...o specifying the peripheral assignment for a channel Description This function assigns a peripheral mapping to a uDMA channel It is used to select which pe ripheral is used for a uDMA channel The para...

Page 275: ...NNEL_SSI1RX UDMA_CHANNEL_SSI1TX UDMA_SEC_CHANNEL_SSI1RX UDMA_SEC_CHANNEL_SSI1TX UDMA_CHANNEL_TMR0A UDMA_CHANNEL_TMR0B UDMA_CHANNEL_TMR1A UDMA_CHANNEL_TMR1B UDMA_SEC_CHANNEL_TMR1A UDMA_SEC_CHANNEL_TMR1...

Page 276: ..._uDMAChannelAttributeEnable Enables attributes of a uDMA channel Prototype void ROM_uDMAChannelAttributeEnable uint32_t ui32ChannelNum uint32_t ui32Attr ROM Location ROM_APITABLE is an array of pointe...

Page 277: ...MA_CHANNEL_UART1RX UDMA_CHANNEL_UART1TX UDMA_SEC_CHANNEL_UART1RX UDMA_SEC_CHANNEL_UART1TX UDMA_SEC_CHANNEL_UART2RX_0 UDMA_SEC_CHANNEL_UART2TX_1 UDMA_SEC_CHANNEL_UART2RX_12 UDMA_SEC_CHANNEL_UART2TX_13...

Page 278: ...eters ui32ChannelNum is the channel to configure Description This function returns a combination of flags representing the attributes of the uDMA channel The ui32ChannelNum parameter must be only one...

Page 279: ...ributes of the uDMA channel which can be any of the following UDMA_ATTR_USEBURST is used to restrict transfers to use only a burst mode UDMA_ATTR_ALTSELECT is used to select the alternate control stru...

Page 280: ...NC_32 or UDMA_SRC_INC_NONE to select an address increment of 8 bit bytes 16 bit halfwords 32 bit words or to select non incrementing Choose the destination address increment from one of UDMA_DST_INC_8...

Page 281: ...HANNEL_SSI0TX UDMA_CHANNEL_SSI1RX UDMA_CHANNEL_SSI1TX UDMA_SEC_CHANNEL_SSI1RX UDMA_SEC_CHANNEL_SSI1TX UDMA_CHANNEL_TMR0A UDMA_CHANNEL_TMR0B UDMA_CHANNEL_TMR1A UDMA_CHANNEL_TMR1B UDMA_SEC_CHANNEL_TMR1A...

Page 282: ...he channel number to enable Description This function enables a specific uDMA channel for use This function must be used to enable a channel before it can be used to perform a uDMA transfer When a uDM...

Page 283: ...UDMA_SEC_CHANNEL_UART2RX_0 UDMA_SEC_CHANNEL_UART2TX_1 UDMA_SEC_CHANNEL_UART2RX_12 UDMA_SEC_CHANNEL_UART2TX_13 UDMA_CHANNEL_USBEP1RX UDMA_CHANNEL_USBEP1TX UDMA_CHANNEL_USBEP2RX UDMA_CHANNEL_USBEP2TX U...

Page 284: ...EL_SSI0RX UDMA_CHANNEL_SSI0TX UDMA_CHANNEL_SSI1RX UDMA_CHANNEL_SSI1TX UDMA_SEC_CHANNEL_SSI1RX UDMA_SEC_CHANNEL_SSI1TX UDMA_CHANNEL_TMR0A UDMA_CHANNEL_TMR0B UDMA_CHANNEL_TMR1A UDMA_CHANNEL_TMR1B UDMA_S...

Page 285: ...annel number with either UDMA_PRI_SELECT or UDMA_ALT_SELECT Description This function is used to get the transfer mode for the uDMA channel It can be used to query the status of a transfer on a channe...

Page 286: ...11 UDMA_SEC_CHANNEL_ADC12 UDMA_SEC_CHANNEL_ADC13 UDMA_CHANNEL_SSI0RX UDMA_CHANNEL_SSI0TX UDMA_CHANNEL_SSI1RX UDMA_CHANNEL_SSI1TX UDMA_SEC_CHANNEL_SSI1RX UDMA_SEC_CHANNEL_SSI1TX UDMA_CHANNEL_TMR0A UDMA...

Page 287: ...TABLE is an array of pointers located at ROM_APITABLE 17 ROM_uDMAChannelScatterGatherSet is a function pointer located at ROM_UDMATABLE 22 Parameters ui32ChannelNum is the uDMA channel number ui32Task...

Page 288: ...ls The parameter ui32DefPeriphs can be the logical OR of any of the following macros If one of the macros below is in the list passed to this function then the default peripheral marked as _DEF_ is se...

Page 289: ...el the default peripheral assignment is no longer available for that channel The parameter ui32SecPeriphs can be the logical OR of any of the following macros If one of the macros below is in the list...

Page 290: ...en the number of remaining items is returned If the transfer is complete then 0 is returned Returns Returns the number of items remaining to transfer 23 2 1 15 ROM_uDMAChannelTransferSet Sets the tran...

Page 291: ...the appropriate data type The ui32TransferSize parameter is the number of data items not the number of bytes The two scatter gather modes memory and peripheral are actually different depending on whe...

Page 292: ...array of pointers located at 0x0100 0010 ROM_UDMATABLE is an array of pointers located at ROM_APITABLE 17 ROM_uDMAControlBaseGet is a function pointer located at ROM_UDMATABLE 9 Description This func...

Page 293: ..._uDMADisable void ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_UDMATABLE is an array of pointers located at ROM_APITABLE 17 ROM_uDMADisable is a function pointer locate...

Page 294: ...t ROM_uDMAErrorStatusGet void ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_UDMATABLE is an array of pointers located at ROM_APITABLE 17 ROM_uDMAErrorStatusGet is a func...

Page 295: ...is an array of pointers located at 0x0100 0010 ROM_UDMATABLE is an array of pointers located at ROM_APITABLE 17 ROM_uDMAIntStatus is a function pointer located at ROM_UDMATABLE 19 Description This fu...

Page 296: ...uDMA Controller 296 April 8 2013...

Page 297: ...ontroller that has a host interface will actually transmit data on an OUT endpoint Another important fact to understand is that all endpoints in the USB controller whether host or device have two side...

Page 298: ...ws transfers as either transmit or receive and the USB controller operates on IN OUT transactions some care must be taken to use the correct uDMA channel with the correct endpoint USB host IN and USB...

Page 299: ...able UDMA_CHANNEL_USBEP1TX UDMA_ATTR_ALL Enable uDMA burst mode ROM_uDMAChannelAttributeEnable UDMA_CHANNEL_USBEP1TX UDMA_ATTR_USEBURST Data size is 8 bits and the source has a one byte increment Dest...

Page 300: ...controller with an OUT endpoint the application must use a receive uDMA channel When calling ROM_USBDevEndpointConfigSet for an endpoint that uses uDMA the application must set extra flags in the ui3...

Page 301: ...requesting of data on endpoint 1 Configure the address and size of the data to transfer The transfer is from the USB FIFO for endpoint 0 to g_DataBufferIn ROM_uDMAChannelTransferSet UDMA_CHANNEL_USBEP...

Page 302: ...ase uint32_t ui32Endpoint bool bIsLast Packet void ROM_USBDevEndpointStall uint32_t ui32Base uint32_t ui32Endpoint uint32_t ui32Flags void ROM_USBDevEndpointStallClear uint32_t ui32Base uint32_t ui32E...

Page 303: ...Base uint32_t ui32Endpoint bool bDataToggle uint32_t ui32Flags void ROM_USBHostEndpointStatusClear uint32_t ui32Base uint32_t ui32Endpoint uint32_t ui32Flags uint32_t ROM_USBHostHubAddrGet uint32_t ui...

Page 304: ...the values that are used to cus tomize the USB interface Description Calling this function commences an update of the firmware via the USB interface This function assumes that the USB interface has a...

Page 305: ...tion pointer located at ROM_USBTABLE 2 Parameters ui32Base specifies the USB module base address ui32Address is the address to use for a device Description This function will set the device address on...

Page 306: ...ated at 0x0100 0010 ROM_USBTABLE is an array of pointers located at ROM_APITABLE 16 ROM_USBDevDisconnect is a function pointer located at ROM_USBTABLE 4 Parameters ui32Base specifies the USB module ba...

Page 307: ...to ROM_USBDevEndpointConfigSet for this endpoint Note This function should only be called in device mode Returns None 24 3 1 7 ROM_USBDevEndpointConfigSet Sets the configuration for an endpoint Protot...

Page 308: ...es of data Also for OUT endpoints the USB_EP_AUTO_CLEAR bit can be used to clear the data packet ready flag automatically once the data has been read from the FIFO If this is not used this flag must b...

Page 309: ...Stall is a function pointer located at ROM_USBTABLE 7 Parameters ui32Base specifies the USB module base address ui32Endpoint specifies the endpoint to stall ui32Flags specifies whether to stall the IN...

Page 310: ...OUT portion of this endpoint Note This function should only be called in device mode Returns None 24 3 1 11 ROM_USBDevEndpointStatusClear Clears the status bits in this endpoint in device mode Prototy...

Page 311: ...iven endpoint s FIFO Prototype uint32_t ROM_USBEndpointDataAvail uint32_t ui32Base uint32_t ui32Endpoint ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_USBTABLE is an arr...

Page 312: ...data from the FIFO for the given endpoint The pui32Size param eter should indicate the size of the buffer passed in the pui32Data parameter The data in the pui32Size parameter is changed to match the...

Page 313: ...0 0010 ROM_USBTABLE is an array of pointers located at ROM_APITABLE 16 ROM_USBEndpointDataSend is a function pointer located at ROM_USBTABLE 12 Parameters ui32Base specifies the USB module base addres...

Page 314: ...made with host or device controllers The ui32Flags parameter should be one of USB_EP_HOST_OUT USB_EP_HOST_IN USB_EP_DEV_OUT or USB_EP_DEV_IN Returns None 24 3 1 18 ROM_USBEndpointDMAChannel Sets the D...

Page 315: ...dpoint uint32_t ui32Flags ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_USBTABLE is an array of pointers located at ROM_APITABLE 16 ROM_USBEndpointDMADisable is a functi...

Page 316: ...OM_USBTABLE is an array of pointers located at ROM_APITABLE 16 ROM_USBEndpointStatus is a function pointer located at ROM_USBTABLE 14 Parameters ui32Base specifies the USB module base address ui32Endp...

Page 317: ...oint USB_DEV_OUT_DATA_ERROR There was a CRC or bit stuff error on an OUT endpoint USB_DEV_OUT_OVERRUN An OUT packet was not loaded due to a full FIFO USB_DEV_OUT_FIFO_FULL The OUT endpoint s FIFO is f...

Page 318: ...t32_t ui32Flags ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_USBTABLE is an array of pointers located at ROM_APITABLE 16 ROM_USBFIFOConfigGet is a function pointer loca...

Page 319: ...IFOSize parameter should be one of the values in the USB_FIFO_SZ_ values If the endpoint is going to use double buffering it should use the values with the _DB at the end of the value For example use...

Page 320: ...ne of USB_EP_HOST_OUT USB_EP_HOST_IN USB_EP_DEV_OUT or USB_EP_DEV_IN Returns None 24 3 1 26 ROM_USBFrameNumberGet Get the current frame number Prototype uint32_t ROM_USBFrameNumberGet uint32_t ui32Bas...

Page 321: ...e that is connected to an endpoint in host mode Prototype void ROM_USBHostAddrSet uint32_t ui32Base uint32_t ui32Endpoint uint32_t ui32Addr uint32_t ui32Flags ROM Location ROM_APITABLE is an array of...

Page 322: ...nt USB_EP_HOST_IN or USB_EP_DEV_IN or an OUT endpoint USB_EP_HOST_OUT or USB_EP_DEV_OUT whether this is a Full speed endpoint USB_EP_SPEED_FULL or a Low speed endpoint USB_EP_SPEED_LOW The USB_EP_MODE...

Page 323: ...to clear the data packet ready flag automatically once the data has been read from the FIFO If this is not used this flag must be manually cleared via a call to ROM_USBDevEndpointStatusClear or ROM_U...

Page 324: ...o force the state of the data toggle in host mode If the value passed in the bDataToggle parameter is false then the data toggle is set to the DATA0 state and if it is true it is set to the DATA1 stat...

Page 325: ...00 0010 ROM_USBTABLE is an array of pointers located at ROM_APITABLE 16 ROM_USBHostHubAddrGet is a function pointer located at ROM_USBTABLE 26 Parameters ui32Base specifies the USB module base address...

Page 326: ...e hub address for a device that is using this endpoint for communication The ui32Flags parameter determines if the device address for the IN or the OUT endpoint is set by this call Note This function...

Page 327: ...he following can be selected as the power fault action USB_HOST_PWRFLT_EP_NONE No automatic action when power fault detected USB_HOST_PWRFLT_EP_TRI Automatically Tri state the USBnEPEN pin on a power...

Page 328: ...This function disables the USBEPEN signal to disable an external power supply in host mode operation Note This function should only be called in host mode Returns None 24 3 1 38 ROM_USBHostPwrEnable...

Page 329: ...n This function disables power fault detection in the USB controller Note This function should only be called in host mode Returns None 24 3 1 40 ROM_USBHostPwrFaultEnable Enables power fault detectio...

Page 330: ...ccess Description This function will schedule a request for an IN transaction When the USB de vice being communicated with responds the data the data can be retrieved by calling ROM_USBEndpointDataGet...

Page 331: ...ROM_APITABLE 16 ROM_USBHostRequestStatus is a function pointer located at ROM_USBTABLE 34 Parameters ui32Base specifies the USB module base address Description This function is used to cause a reques...

Page 332: ...t ROM_USBTABLE 36 Parameters ui32Base specifies the USB module base address bStart specifies if the USB controller is entering or leaving the resume signaling state Description When in device mode thi...

Page 333: ...W_SPEED USB_FULL_SPEED or USB_UNDEF_SPEED 24 3 1 47 ROM_USBHostSuspend Puts the USB bus in a suspended state Prototype void ROM_USBHostSuspend uint32_t ui32Base ROM Location ROM_APITABLE is an array o...

Page 334: ...INTCTRL_ and not any other USB_INT flags Returns None 24 3 1 49 ROM_USBIntDisableEndpoint Disables endpoint interrupts on a given USB controller Prototype void ROM_USBIntDisableEndpoint uint32_t ui32B...

Page 335: ...hould be the definitions that start with USB_INTCTRL_ and not any other USB_INT flags Returns None 24 3 1 51 ROM_USBIntEnableEndpoint Enables endpoint interrupts on a given USB controller Prototype vo...

Page 336: ...e flags are only valid in the following modes as indicated in the parenthesis Host Device and OTG USB_INTCTRL_ALL A full mask of all control interrupt sources USB_INTCTRL_VBUS_ERR A VBUS error has occ...

Page 337: ...points Note This call will clear the source of all of the endpoint interrupts Returns Returns the status of the endpoint interrupts for a USB controller 24 3 1 54 ROM_USBModeGet Returns the current op...

Page 338: ...her a host or device Returns Returns USB_OTG_MODE_ASIDE_HOST USB_OTG_MODE_ASIDE_DEV USB_OTG_MODE_BSIDE_HOST USB_OTG_MODE_BSIDE_DEV USB_OTG_MODE_NONE USB_DUAL_MODE_HOST USB_DUAL_MODE_DEVICE or USB_DUAL...

Page 339: ...s None 24 3 1 57 ROM_USBPHYPowerOff Powers off the USB PHY Prototype void ROM_USBPHYPowerOff uint32_t ui32Base ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_USBTABLE is...

Page 340: ...HYPowerOn is a function pointer located at ROM_USBTABLE 57 Parameters ui32Base specifies the USB module base address Description This function will power on the USB PHY enabling it return to normal op...

Page 341: ...timer resumes count ing down from that value If the timer counts down to its zero state again before the first timeout interrupt is cleared and the reset signal has been enabled the watchdog timer ass...

Page 342: ...dule Description This will enable the watchdog timer counter and interrupt Note This function will have no effect if the watchdog timer has been locked See also ROM_WatchdogLock ROM_WatchdogUnlock Ret...

Page 343: ...ROM Location ROM_APITABLE is an array of pointers located at 0x0100 0010 ROM_WATCHDOGTABLE is an array of pointers located at ROM_APITABLE 12 ROM_WatchdogIntEnable is a function pointer located at ROM...

Page 344: ...APITABLE is an array of pointers located at 0x0100 0010 ROM_WATCHDOGTABLE is an array of pointers located at ROM_APITABLE 12 ROM_WatchdogIntTypeSet is a function pointer located at ROM_WATCHDOGTABLE 1...

Page 345: ..._WATCHDOGTABLE is an array of pointers located at ROM_APITABLE 12 ROM_WatchdogLockState is a function pointer located at ROM_WATCHDOGTABLE 7 Parameters ui32Base is the base address of the watchdog tim...

Page 346: ...rameters ui32Base is the base address of the watchdog timer module ui32LoadVal is the load value for the watchdog timer Description This function sets the value to load into the watchdog timer when th...

Page 347: ...gLock ROM_WatchdogUnlock Returns None 25 2 1 11 ROM_WatchdogResetEnable Enables the watchdog timer reset Prototype void ROM_WatchdogResetEnable uint32_t ui32Base ROM Location ROM_APITABLE is an array...

Page 348: ...ROM_WatchdogStallDisable Disables stalling of the watchdog timer during debug events Prototype void ROM_WatchdogStallDisable uint32_t ui32Base ROM Location ROM_APITABLE is an array of pointers located...

Page 349: ...ime after the processor has been restarted Returns None 25 2 1 15 ROM_WatchdogUnlock Disables the watchdog timer lock mechanism Prototype void ROM_WatchdogUnlock uint32_t ui32Base ROM Location ROM_API...

Page 350: ...Parameters ui32Base is the base address of the watchdog timer module Description This function reads the current value of the watchdog timer Returns Returns the current value of the watchdog timer 35...

Page 351: ...April 8 2013 351...

Page 352: ...or compliance with all legal regulatory and safety related requirements concerning its products and any use of TI components in its applications notwithstanding any applications related information or...

Reviews: