Article Details

ID: 3043
Case Type: faq
Category: Architecture
Related To: IO
Family: MachXO2

Search Answer Database

How can I configure the MachXO2 sysCONFIG Ports to function as the General Purpose I/Os (GPIOs)?

The MachXO2 sysCONFIG Ports can be configured to function as the General Purpose IOs (GPIOs). You can accomplish this by using the Lattice Diamond Spreadsheet View's Global Preferences tab. The MachXO2 sysCONFIG Ports are:1. Self-Download-Mode (SDM) Port ---> PROGRAMN, INITN, DONE2. Slave Serial-Peripheral-Interface (SSPI) Port ---> CCLK, SI, SO, SN3. Inter-Integrated-Circuit (I2C) Port ---> SCL, SDA4. Master Serial-Peripheral-Interface (MSPI)Port ---> MCLK, SISPI, SPISO, CSSPIN5. Joint-Test-Access-Group (JTAG) Port ---> TDI, TDO, TCK, TMS, JTAGENBIn the Global Preferences tab, you will find the following sysCONFIG Port attributes:1. SDM_PORT2. SLAVE_SPI_PORT3. I2C_PORT4. MASTER_SPI_PORT5. JTAG_PORTThese attributes can assume values either "Enable" or "Disable". The Ports that are set as "Enable" will continue to function as the sysCONFIG Ports.The Ports that are set as "Disable" will function as the GPIOs.For example:Say, you want the SDM Port to function as GPIO. To do so, you will have to set the SDM_PORT as "Disable" in the "Global Preferences" tab. By doing so, the SDM Port pins namely PROGRAMN, INITN, DONE, will function as GPIOs.The default setting in Lattice Diamond is that, except for JTAG_PORT, all other sysCONFIG Port attributes are set as "Disable". You need to take care and identify, as to which sysCONFIG ports you would want to function as the dedicated configuration port, or the GPIOs, and set the attributes accordingly in the "Global Preferences" tab.For more detailed information, refer to the sections "sysCONFIG\u2122 Ports" and "sysCONFIG Pins" in the MachXO2 Programming and Configuration Usage Guide (TN1204).Steps to get the Application Note:Go to Choose Products > Programmable Logic > Mach >MachXO2 > Documentation > Application Note > MachXO2 Programming and Configuration Usage Guide (TN1204).Link to TN1204-MachXO2 Programming and Configuration Usage Guide:
Like most websites, we use cookies and similar technologies to enhance your user experience. We also allow third parties to place cookies on our website. By continuing to use this website you consent to the use of cookies as described in our Cookie Policy.