#include "driverlib/5xx_6xx/sfr_sys.h"
#include "inc/hw_types.h"
#include "deprecated/CCS/msp430xgeneric.h"
#include "driverlib/5xx_6xx/debug.h"
Functions | |
void | SFR_enableInterrupt (unsigned int baseAddress, unsigned char interruptMask) |
void | SFR_disableInterrupt (unsigned int baseAddress, unsigned char interruptMask) |
unsigned char | SFR_getInterruptStatus (unsigned int baseAddress, unsigned char interruptFlagMask) |
void | SFR_clearInterrupt (unsigned int baseAddress, unsigned char interruptFlagMask) |
void | SFR_setResetPinPullResistor (unsigned int baseAddress, unsigned int pullResistorSetup) |
void | SFR_setNMIEdge (unsigned int baseAddress, unsigned int edgeDirection) |
void | SFR_setResetNMIPinFunction (unsigned int baseAddress, unsigned char resetPinFunction) |
void | SYS_enableDedicatedJTAGPins (unsigned int baseAddress) |
unsigned short | SYS_getBSLEntryIndication (unsigned int baseAddress) |
void | SYS_enablePMMAccessProtect (unsigned int baseAddress) |
void | SYS_enableRAMBasedInterruptVectors (unsigned int baseAddress) |
void | SYS_disableRAMBasedInterruptVectors (unsigned int baseAddress) |
void | SYS_enableBSLProtect (unsigned int baseAddress) |
void | SYS_disableBSLProtect (unsigned int baseAddress) |
void | SYS_enableBSLMemory (unsigned int baseAddress) |
void | SYS_disableBSLMemory (unsigned int baseAddress) |
void | SYS_setRAMAssignedToBSL (unsigned int baseAddress, unsigned char BSLRAMAssignment) |
void | SYS_setBSLSize (unsigned int baseAddress, unsigned char BSLSizeSelect) |
void | SYS_JTAGMailboxInit (unsigned int baseAddress, unsigned char mailboxSizeSelect, unsigned char autoClearInboxFlagSelect) |
unsigned char | SYS_getJTAGMailboxFlagStatus (unsigned int baseAddress, unsigned char mailboxFlagMask) |
void | SYS_clearJTAGMailboxFlagStatus (unsigned int baseAddress, unsigned char mailboxFlagMask) |
unsigned int | SYS_getJTAGInboxMessage16Bit (unsigned int baseAddress, unsigned char inboxSelect) |
unsigned long | SYS_getJTAGInboxMessage32Bit (unsigned int baseAddress) |
void | SYS_setJTAGOutgoingMessage16Bit (unsigned int baseAddress, unsigned char outboxSelect, unsigned int outgoingMessage) |
void | SYS_setJTAGOutgoingMessage32Bit (unsigned int baseAddress, unsigned long outgoingMessage) |
void SFR_enableInterrupt | ( | unsigned int | baseAddress, |
unsigned char | interruptMask | ||
) |
Enables selected SFR interrupt sources.
baseAddress | is the Base Address of the SFR Module. |
interruptMask | is the bit mask of interrupts that will be enabled. Mask Value is the logical OR of any of the following SFR_JTAG_OUTBOX_INTERRUPT - JTAG outbox interrupt enable SFR_JTAG_INBOX_INTERRUPT- JTAG inbox interrupt enable SFR_FLASH_CONTROLLER_ACCESS_VIOLATION_INTERRUPT - Flash controller access violation interrupt enable SFR_NMI_PIN_INTERRUPT - NMI pin interrupt enable, if NMI function is chosen SFR_VACANT_MEMORY_ACCESS_INTERRUPT - Vacant memory access interrupt enable SFR_OSCILLATOR_FAULT_INTERRUPT - Oscillator fault interrupt enable SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT - Watchdog interval timer interrupt enable |
This function enables the selected SFR interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.
References HWREGB.
void SFR_disableInterrupt | ( | unsigned int | baseAddress, |
unsigned char | interruptMask | ||
) |
Disables selected SFR interrupt sources.
baseAddress | is the Base Address of the SFR Module. |
interruptMask | is the bit mask of interrupts that will be disabled. Mask Value is the logical OR of any of the following SFR_JTAG_OUTBOX_INTERRUPT - JTAG outbox interrupt enable SFR_JTAG_INBOX_INTERRUPT- JTAG inbox interrupt enable SFR_FLASH_CONTROLLER_ACCESS_VIOLATION_INTERRUPT - Flash controller access violation interrupt enable SFR_NMI_PIN_INTERRUPT - NMI pin interrupt enable, if NMI function is chosen SFR_VACANT_MEMORY_ACCESS_INTERRUPT - Vacant memory access interrupt enable SFR_OSCILLATOR_FAULT_INTERRUPT - Oscillator fault interrupt enable SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT - Watchdog interval timer interrupt enable |
This function disables the selected SFR interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.
References HWREGB.
unsigned char SFR_getInterruptStatus | ( | unsigned int | baseAddress, |
unsigned char | interruptFlagMask | ||
) |
Returns the status of the selected SFR interrupt flags.
baseAddress | is the Base Address of the SFR Module. |
interruptFlagMask | is the bit mask of interrupt flags that the status of should be returned. Mask Value is the logical OR of any of the following SFR_JTAG_OUTBOX_INTERRUPT - JTAG outbox interrupt flag SFR_JTAG_INBOX_INTERRUPT- JTAG inbox interrupt flag SFR_FLASH_CONTROLLER_ACCESS_VIOLATION_INTERRUPT - Flash controller access violation interrupt flag SFR_NMI_PIN_INTERRUPT - NMI pin interrupt flag SFR_VACANT_MEMORY_ACCESS_INTERRUPT - Vacant memory access interrupt flag SFR_OSCILLATOR_FAULT_INTERRUPT - Oscillator fault interrupt flag SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT - Watchdog interval timer interrupt flag |
This function returns the status of the selected SFR interrupt flags in a bit mask format matching that passed into the interruptFlagMask parameter.
References HWREGB.
void SFR_clearInterrupt | ( | unsigned int | baseAddress, |
unsigned char | interruptFlagMask | ||
) |
Clears the selected SFR interrupt flags.
baseAddress | is the Base Address of the SFR Module. |
interruptFlagMask | is the bit mask of interrupt flags that will be cleared. Mask Value is the logical OR of any of the following SFR_JTAG_OUTBOX_INTERRUPT - JTAG outbox interrupt flag SFR_JTAG_INBOX_INTERRUPT- JTAG inbox interrupt flag SFR_FLASH_CONTROLLER_ACCESS_VIOLATION_INTERRUPT - Flash controller access violation interrupt flag SFR_NMI_PIN_INTERRUPT - NMI pin interrupt flag SFR_VACANT_MEMORY_ACCESS_INTERRUPT - Vacant memory access interrupt flag SFR_OSCILLATOR_FAULT_INTERRUPT - Oscillator fault interrupt flag SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT - Watchdog interval timer interrupt flag |
This function clears the status of the selected SFR interrupt flags.
References HWREGB.
void SFR_setResetPinPullResistor | ( | unsigned int | baseAddress, |
unsigned int | pullResistorSetup | ||
) |
Sets the pull-up/down resistor on the ~RST/NMI pin.
baseAddress | is the Base Address of the SFR Module. |
pullResistorSetup | is the selection of how the pull-up/down resistor on the ~RST/NMI pin should be setup or disabled. Valid values are SFR_RESISTORDISABLE SFR_RESISTORENABLE_PULLUP [Default] SFR_RESISTORENABLE_PULLDOWN Modified bits are SYSRSTRE and SYSRSTUP of SFRRPCR register. |
This function sets the pull-up/down resistors on the ~RST/NMI pin to the settings from the pullResistorSetup parameter.
References HWREGB.
void SFR_setNMIEdge | ( | unsigned int | baseAddress, |
unsigned int | edgeDirection | ||
) |
Sets the edge direction that will assert an NMI from a signal on the ~RST/NMI pin if NMI function is active.
baseAddress | is the Base Address of the SFR Module. |
edgeDirection | is the direction that the signal on the ~RST/NMI pin should go to signal an interrupt, if enabled. Valid values are SFR_NMI_RISINGEDGE [Default] SFR_NMI_FALLINGEDGE Modified bits are SYSNMIIES of SFRRPCR register. |
This function sets the edge direction that will assert an NMI from a signal on the ~RST/NMI pin if the NMI function is active. To activate the NMI function of the ~RST/NMI use the SFR_setResetNMIPinFunction() passing SFR_RESETPINFUNC_NMI into the resetPinFunction parameter.
References HWREGB.
void SFR_setResetNMIPinFunction | ( | unsigned int | baseAddress, |
unsigned char | resetPinFunction | ||
) |
Sets the function of the ~RST/NMI pin.
baseAddress | is the Base Address of the SFR Module. |
resetPinFunction | is the function that the ~RST/NMI pin should take on. Valid values are SFR_RESETPINFUNC_RESET [Default] SFR_RESETPINFUNC_NMI Modified bits are SYSNMI of SFRRPCR register. |
This function sets the functionality of the ~RST/NMI pin, whether in reset mode which will assert a reset if a low signal is observed on that pin, or an NMI which will assert an interrupt from an edge of the signal dependent on the setting of the edgeDirection parameter in SFR_setNMIEdge().
References HWREGB.
void SYS_enableDedicatedJTAGPins | ( | unsigned int | baseAddress | ) |
Sets the JTAG pins to be exclusively for JTAG until a BOR occurs.
baseAddress | is the Base Address of the SYS Module. |
This function sets the JTAG pins to be exclusively used for the JTAG, and not to be shared with the GPIO pins. This setting can only be cleared when a BOR occurs.
References HWREGB.
unsigned short SYS_getBSLEntryIndication | ( | unsigned int | baseAddress | ) |
Returns the indication of a BSL entry sequence from the Spy-Bi-Wire.
baseAddress | is the Base Address of the SYS Module. |
This function returns the indication of a BSL entry sequence from the Spy-Bi-Wire.
References HWREGB, SYS_BSLENTRY_INDICATED, and SYS_BSLENTRY_NOTINDICATED.
void SYS_enablePMMAccessProtect | ( | unsigned int | baseAddress | ) |
Enables PMM Access Protection.
baseAddress | is the Base Address of the SYS Module. |
This function enables the PMM Access Protection, which will lock any changes on the PMM control registers until a BOR occurs.
References HWREGB.
void SYS_enableRAMBasedInterruptVectors | ( | unsigned int | baseAddress | ) |
Enables RAM-based Interrupt Vectors.
baseAddress | is the Base Address of the SYS Module. |
This function enables RAM-base Interrupt Vectors, which means that interrupt vectors are generated with the end address at the top of RAM, instead of the top of the lower 64kB of flash.
References HWREGB.
void SYS_disableRAMBasedInterruptVectors | ( | unsigned int | baseAddress | ) |
Disables RAM-based Interrupt Vectors.
baseAddress | is the Base Address of the SYS Module. |
This function disables the interrupt vectors from being generated at the top of the RAM.
References HWREGB.
void SYS_enableBSLProtect | ( | unsigned int | baseAddress | ) |
Enables BSL memory protection.
baseAddress | is the Base Address of the SYS Module. |
This function enables protection on the BSL memory, which prevents any reading, programing, or erasing of the BSL memory.
References HWREG.
void SYS_disableBSLProtect | ( | unsigned int | baseAddress | ) |
Disables BSL memory protection.
baseAddress | is the Base Address of the SYS Module. |
This function disables protection on the BSL memory.
References HWREG.
void SYS_enableBSLMemory | ( | unsigned int | baseAddress | ) |
Enables BSL memory.
baseAddress | is the Base Address of the SYS Module. |
This function enables BSL memory, which allows BSL memory to be addressed
References HWREG.
void SYS_disableBSLMemory | ( | unsigned int | baseAddress | ) |
Disables BSL memory.
baseAddress | is the Base Address of the SYS Module. |
This function disables BSL memory, which makes BSL memory act like vacant memory.
References HWREG.
void SYS_setRAMAssignedToBSL | ( | unsigned int | baseAddress, |
unsigned char | BSLRAMAssignment | ||
) |
Sets RAM assignment to BSL area.
baseAddress | is the Base Address of the SYS Module. |
BSLRAMAssignment | is the selection of if the BSL should be placed in RAM or not. Valid values are SYS_BSLRAMASSIGN_NORAM [Default] SYS_BSLRAMASSIGN_LOWEST16BYTES Modified bits are SYSBSLR of SYSBSLC register |
This function allows RAM to be assigned to BSL, based on the selection of the BSLRAMAssignment parameter.
References HWREGB.
void SYS_setBSLSize | ( | unsigned int | baseAddress, |
unsigned char | BSLSizeSelect | ||
) |
Sets the size of the BSL in Flash.
baseAddress | is the Base Address of the SYS Module. |
BSLSizeSelect | is the amount of segments the BSL should take. Valid values are SYS_BSLSIZE_SEG3 SYS_BSLSIZE_SEGS23 SYS_BSLSIZE_SEGS123 SYS_BSLSIZE_SEGS1234 [Default] Modified bits are SYSBSLSIZE of SYSBSLC register. |
This function sets the size of the BSL in Flash memory.
References HWREGB.
void SYS_JTAGMailboxInit | ( | unsigned int | baseAddress, |
unsigned char | mailboxSizeSelect, | ||
unsigned char | autoClearInboxFlagSelect | ||
) |
Initializes JTAG Mailbox with selected properties.
baseAddress | is the Base Address of the SYS Module. |
mailboxSizeSelect | is the size of the JTAG Mailboxes, whether 16- or 32-bits. Valid values are SYS_JTAGMBSIZE_16BIT - the JTAG messages will take up only one JTAG mailbox (i.e. an outgoing message will take up only 1 outbox of the JTAG mailboxes) [Default] SYS_JTAGMBSIZE_32BIT - the JTAG messages will be contained within both JTAG mailboxes (i.e. an outgoing message will take up both Outboxes of the JTAG mailboxes) Modified bits are JMBMODE of SYSJMBC register. |
autoClearInboxFlagSelect | decides how the JTAG inbox flags should be cleared, whether automatically after the corresponding outbox has been written to, or manually by software. Valid values are SYS_JTAGINBOX0AUTO_JTAGINBOX1AUTO - both JTAG inbox flags will be reset automatically when the corresponding inbox is read from. [Default] SYS_JTAGINBOX0AUTO_JTAGINBOX1SW - only JTAG inbox 0 flag is reset automatically, while JTAG inbox 1 is reset with the SYS_clearJTAGMailboxFlagStatus() function SYS_JTAGINBOX0SW_JTAGINBOX1AUTO - only JTAG inbox 1 flag is reset automatically, while JTAG inbox 0 is reset with the SYS_clearJTAGMailboxFlagStatus() function SYS_JTAGINBOX0SW_JTAGINBOX1SW - both JTAG inbox flags will need to be reset manually by the SYS_clearJTAGMailboxFlagStatus() function Modified bits are JMBCLR1OFF and JMBCLR0OFF of SYSJMBC register. |
This function sets the specified settings for the JTAG Mailbox system. The settings that can be set are the size of the JTAG messages, and the auto- clearing of the inbox flags. If the inbox flags are set to auto-clear, then the inbox flags will be cleared upon reading of the inbox message buffer, otherwise they will have to be reset by software using the SYS_clearJTAGMailboxFlagStatus() function.
References HWREGB.
unsigned char SYS_getJTAGMailboxFlagStatus | ( | unsigned int | baseAddress, |
unsigned char | mailboxFlagMask | ||
) |
Returns the status of the selected JTAG Mailbox flags.
baseAddress | is the Base Address of the SYS Module. |
mailboxFlagMask | is the bit mask of JTAG mailbox flags that the status of should be returned. Mask Value is the logical OR of any of the following JMBOUT1FG - flag for JTAG outbox 1 JMBOUT0FG - flag for JTAG outbox 0 JMBIN1FG - flag for JTAG inbox 1 JMBIN0FG - flag for JTAG inbox 0 |
This function will return the status of the selected JTAG Mailbox flags in bit mask format matching that passed into the mailboxFlagMask parameter.
References HWREGB.
void SYS_clearJTAGMailboxFlagStatus | ( | unsigned int | baseAddress, |
unsigned char | mailboxFlagMask | ||
) |
Clears the status of the selected JTAG Mailbox flags.
baseAddress | is the Base Address of the SYS Module. |
mailboxFlagMask | is the bit mask of JTAG mailbox flags that the status of should be cleared. Mask Value is the logical OR of any of the following JMBOUT1FG - flag for JTAG outbox 1 JMBOUT0FG - flag for JTAG outbox 0 JMBIN1FG - flag for JTAG inbox 1 JMBIN0FG - flag for JTAG inbox 0 |
This function clears the selected JTAG Mailbox flags.
References HWREGB.
unsigned int SYS_getJTAGInboxMessage16Bit | ( | unsigned int | baseAddress, |
unsigned char | inboxSelect | ||
) |
Returns the contents of the selected JTAG Inbox in a 16 bit format.
baseAddress | is the Base Address of the SYS Module. |
inboxSelect | is the chosen JTAG inbox that the contents of should be returned Valid values are SYS_JTAGINBOX_0 - return contents of JTAG inbox 0 SYS_JTAGINBOX_1 - return contents of JTAG inbox 1 |
This function returns the message contents of the selected JTAG inbox. If the auto clear settings for the Inbox flags were set, then using this function will automatically clear the corresponding JTAG inbox flag.
References HWREG.
unsigned long SYS_getJTAGInboxMessage32Bit | ( | unsigned int | baseAddress | ) |
Returns the contents of JTAG Inboxes in a 32 bit format.
baseAddress | is the Base Address of the SYS Module. |
This function returns the message contents of both JTAG inboxes in a 32 bit format. This function should be used if 32-bit messaging has been set in the SYS_JTAGMailboxInit() function. If the auto clear settings for the Inbox flags were set, then using this function will automatically clear both JTAG inbox flags.
References HWREG.
void SYS_setJTAGOutgoingMessage16Bit | ( | unsigned int | baseAddress, |
unsigned char | outboxSelect, | ||
unsigned int | outgoingMessage | ||
) |
Sets a 16 bit outgoing message in to the selected JTAG Outbox.
baseAddress | is the Base Address of the SYS Module. |
outboxSelect | is the chosen JTAG outbox that the message should be set it. Valid values are SYS_JTAGOUTBOX_0 - set the contents of JTAG outbox 0 SYS_JTAGOUTBOX_1 - set the contents of JTAG outbox 1 |
outgoingMessage | is the message to send to the JTAG. Modified bits are MSGHI and MSGLO of SYSJMBOx register. |
This function sets the outgoing message in the selected JTAG outbox. The corresponding JTAG outbox flag is cleared after this function, and set after the JTAG has read the message.
References HWREG.
void SYS_setJTAGOutgoingMessage32Bit | ( | unsigned int | baseAddress, |
unsigned long | outgoingMessage | ||
) |
Sets a 32 bit message in to both JTAG Outboxes.
baseAddress | is the Base Address of the SYS Module. |
outgoingMessage | is the message to send to the JTAG. Modified bits are MSGHI and MSGLO of SYSJMBO0 and SYSJMBO1 registers. |
This function sets the 32-bit outgoing message in both JTAG outboxes. The JTAG outbox flags are cleared after this function, and set after the JTAG has read the message.
References HWREG.