2.3 Evaluation GUI Setup and Programming
This section provides details on programming the ATSAMC21 microcontroller using Microchip Studio, enabling the programming of the ATA5831-XPRO extension board and the ATAB8510B-V2.0 remote sensor using the evaluation GUI. The steps are as follows:
- Connect the ATSAMC21-XPRO board
                    to the PC using a Micro-B USB cable to power the board and to communicate with
                    the ATAxxxx-UHF-Evaluation-GUI tool.Note: The installation of the drivers is expected to take a few minutes as the Windows operating system automatically manages the required driver configuration for the hardware.
 - Run Microchip Studio and access
                    the programming dialog. Go to Tools > Device Programming.
Figure 2-2. Run Microchip Studio  - To program the GUI firmware onto
                    the ATSAMC21-XPRO board, the user must perform the following steps:
- Under the “Tool” drop-down list, select the Embedded Debugger (EDBG) from the ATSAMC21-XPRO. For example, in this case it is EDBG (ATML2419102700005434).
 - The Microchip Studio
                            software automatically detects and selects the appropriate device and
                            interface required for programming (see Figure 2-4).
- In this case, the “Device” is ATSAMC21J18A.
 - In this case, the “Interface” is SWD.
 
 - Click Apply to
                            establish a connection.
Figure 2-3. Device Programming Window  - In the Memories section,
                            select the firmware file stored during the installation process of the
                            ATAxxxx-UHF-Evaluation-GUI
                                (
Microchip\MCHP_ATA_UHF_Evaluation_GUI\SAMC21\MCHP_ATA_UHF_SAMC21.hex). - Click Program to
                            initiate the programming process.
Figure 2-4. EDBG (ATML2419102700005434) – Device Programming  
 - For the ATA5831-XPRO extension
                    board programming: 
- Run the
                                
ATAxxxx-UHF-Evaluation-GUI.exe, then select Industrial Segment.Figure 2-5. Industrial Segment  - The user must check the
                            Event Register by clicking the Get Event Bytes button.
                                
SYS_RDYandNPWRON2must be set, indicating that the system is ready for operation.Figure 2-6. Get Event Bytes  
 - Run the
                                
 - In the ISP programming
                    tab, load the precompiled object file:
                        
Base_Station_ATA5831_XPRO_EEPROM_434MHz.eep. - Check “Verify EEPROM after programming” to ensure the accuracy of the EEPROM programming process.
 - Click Program to initiate
                    the programming.Note: The user must ensure that the fuses (0xDF) and Lock bits (0xFF) are set correctly.
Figure 2-7. Loading of the Base_Station_ATA5831_XPRO_EEPROM_434MHz.eepFile - Close the
                    ATAxxxx-UHF-Evaluation-GUI tool and disconnect the ATA5831-XPRO extension
                        board.Note: Upon restarting the ATAxxxx-UHF-Evaluation-GUI tool, it automatically verifies the connected board through the In-System Programming (ISP) mode. If there is no board connected, the GUI displays the necessary connections.
 - Upon reopening the
                    ATAxxxx-UHF-Evaluation-GUI tool, the user must follow the connection
                    recommendation for the ATAB8510B-V2.0 remote sensor.
- From the “Select a
                            Device” drop-down list, select ATA8510 for proceeding with the
                            ATAB8510B-V2.0 programming.
Figure 2-8. ATA8510 Device Selection  - If a board is not connected, the system does not provide a device
                                ID.
Figure 2-9. Device Selection Window  
 - From the “Select a
                            Device” drop-down list, select ATA8510 for proceeding with the
                            ATAB8510B-V2.0 programming.
 - In the ISP programming
                    tab, the user must perform the following steps for the ATAB8510B-V2.0 remote
                    sensor programming: 
- In the Flash section,
                            click ..., then load the precompiled object file to Flash the
                                
Remote_Sensor_ATAB8510B_V2.0_Flash.hexfile.- Check “Erase Flash before programming” and “Verify Flash after programming”.
 - Click Program to initiate the programming.
 
 - In the EEPROM section,
                            click ... to load the file for EEPROM:
                                
Remote_Sensor_ATAB8510B_V2.0_EEPROM_434MHz.eep.- Check “Verify EEPROM after programming”.
 - Click Program to initiate the programming.
 
 - In the Fuse Byte section, check “EESAVE” and “BOOTRST”, write the configuration ensuring SPIEN is active and verify the correct setting of fuses (0xD3) and Lock bits (0xFF).
 
Note: The user must maintain pressure on the button (by pressing SW1 or SW2) on the ATAB8510B-V2.0 remote sensor throughout the programming process to keep the ATAB8510B-V2.0 remote sensor active.Figure 2-10. ATAB8510B-V2.0 Remote Sensor – SW1 and SW2 Buttons Figure 2-11. Programming ATAB8510B-V2.0 Remote Sensor – Flash and EEPROM Configuration  - In the Flash section,
                            click ..., then load the precompiled object file to Flash the
                                
 - With the peripheral programmed,
                    the user can proceed to write the required firmware to the ATSAMC21-XPRO board
                    by following steps 3-7 with the firmware file available in the
                        
ATA8510-EK1 Tool Pack v4.0of the demo, with the nameBase_Station_SAMC21_Flash.hex. - After successfully programming the RF devices with the required configuration and software, the user can set up the ATA8510-EK1 demo. To set up the ATA8510-EK1 demo, refer to the ATA8510-EK1 Evaluation Kit User Guide (DS50003551).
 
