Home
SAM4CP16C USER GUIDE
Contents
1. base PERIPHERALS Address 0x40000000 base n Search 02 OO OO OO OO OO OO OO OO BE OO OO BE OO BO BO OO BE OG BB OO 0O 00 0O 00 a Hit Count no condition break always currently 2 Breakpoints KRAE Ea E EEEN d Window Immediate Window E Output In case you only want to download the program on the SAM4CP16C without debugging clicking on the Start Without Debugging button is l Close the project on the toolbar File gt CloseSolution For further information please refer to the tool s embedded help in the menu bar or visit the webpage http www atmel com microsite atmel_ studio6 default aspx PLC application example 1 PHY Tester The boards of the kit by default are programmed with the embedded PLC PHY Tester tool firmware for SAM4CP16C device apos_ phy tester _tool bin It is an application example that shows the capabilities of the SAM4CP16C in a point to point connection physical layer This application requires a pair of boards and a PC tool Atmel PLC PHY Tester tool which has to be installed in the user s host PC to interface with the boards In any case boards could be loaded with a previous binary file version of this application So we recommend to load this file again previously to evaluate the boards For that you have to build the project aoos phy tester too to generate the output file to program See section 6 2 4 to know more about programming the SAM4CP16CMB boards
2. Atmel recommends to load the binary generated with the last PHY Tester Tool project released in the kit to evaluate the board with last improvements After installing the Atmel PLC PHY Tester tool in your PC s connect the boards to the grid and to the host s PC s as shown in the following figure SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 15 SAM4CP16CMB Boards connection scheme Following chapters explain to you how to install the PC tool supply the boards and select the UARTO to communicate with the SAM4CP16C Load the firmware and run the application 6 2 1 Atmel PLC PHY Tester tool Installation To install Atmel PLC PHY Tester tool in a Windows Operating System execute the provided installer in the Tools folder PCTools ATMEL_PLC_PHY_Tester ATMEL_PLC_PHY_Tester_Tool_vxX Y Z exe and follow the installation wizard The installer wizard should open To follow with the installation click Next Figure 6 16 Installation process slide 1 Choose for which users you want to install Atmel PLC PHY Tester Tool Select whether you want to install Atmel PLC PHY Tester Tool for yourself only or for all users of this computer Click Next to continue Install for anyone using this computer Install just for me Nullsoft Install System v2 46 Select the users permissions and click Next Atmel SAM4CP16C EK Kit Us
3. E cont_c42364a_sledeh Nat E conf_clock h 78 while 1 R cont_oss h 79 by 1 FYB cont_plattorm h 20 E cont_pplic_it h 81 g j E conf_project h 82 brief Main code entry point F D cont_sicde h ag b Bicont_sleepmgrh e4 int main void E conf_uart_serial h 85 H E conf_usi h 86 Initialize OSS FreeRTOSContfig h E 87 oss_init k E Config h a E dims_emu_coord c i5 onean ed Pa a dims_emu_coord h 90 oss_set_app init short_cycle_base_init mane 9AS AEC BRP prOCESA procesa_cycles app 5 i oss_set_lms_timer_cb update_cycles_timer E bootstrap 32 E common i am 2 eee Jibs 96 i joy a7 L Overvie w apps_dims_emu_coord_app_flash apps_dims_emu_dk alo 7a z sips Messages Building configuration apps_dilms_emu_coord_app_flash Debug Updating build tree Configuration is up to date DOD Lpa 7 To stop C SPY click the Break button on the debug bar 8 To exit C SPY click the Stop Debugging button x on the toolbar 9 To exit the IAR Embedded Workbench IDE choose File gt Exit You will be asked whether you want to save any changes to editor windows the projects and the workspace before closing them For examples of building application and library projects see the tutorials in the Information Center For more information a
4. PLC Coupling Tx ATPLCOUPxxx Board PLOTX TS E SL Erro TE Initial Release TRENT TXRKO meno Rev Description Date Autor File date Sheet 5 of 8 8x Author AR Project SAMACP16xMB v1 Atmel Verified uc File PLC Coupling Tx SchDoc TITLE PLC Coupling Tx 1 2 3 4 I 2 3 4 PLC RX ae E Initial Release 11 19 2014 AGC 0 5 pi VRC PRX Rev Description Date Author VIPA aS Fie oae oaa Stet 6 of 8 mofa feasan Atmel Vernea Lc Fie PLC Counting Re Scho tm PLC Couping Rx 4 VIMA VIMA Ta Atmel SAM4CP16C EK Kit User Manual USER GUIDE 95 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 96 Figure A 7 SAM4CP16CMB Peripherals 2 3 4 Peripherals SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Fie oae naaa Shet 7 ot 8 amora Prome samcrionavi At ne verted ac Fe Perpherais Sendo Code number SAM4CP16xMB Atmel Figure A 8 SAM4CP16CMB Interface j 2 3 4 s 7 3 JL ON gt RS485 enable Not Conmect 38 JII OFF gt RS485 Disable SAM4CP16xMB Atmel SAM4CP16C EK Kit User Manual USER GUIDE 97 Atmel 48086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure A 9 SAM4CP16CMB components location in top layer EXT1 XRJANNE D PRO 1 hee T
5. 39 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 1 5 Atmel Software Framework ASF The Atmel Software Framework ASF is a collection of embedded software for the Atmel Flash MCUs megaAVR AVR XMEGA AVR UC3 and SAM devices lt simplifies the use of our microcontrollers by providing an abstraction to the hardware and high value middleware ASF is designed to be used for evaluation prototyping design and production phases The intention of ASF is to provide a rich set of proven drivers and code modules developed by Atmel experts to reduce customer design time It simplifies the usage of microcontrollers providing an abstraction to the hardware and high value middleware ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as standalone for GCC IAR compilers ASF can be downloaded for free ASF is an open source code library designed to be used for evaluation prototyping design and production phases The Atmel Software Framework is split in six main parts the avr32 directory the xmega directory the mega directory the common directory the sam directory and the thirdparty directory These six directories represent the Atmel AVR UCS architecture the Atmel megaAVR the Atmel AVR XMEGA architecture and the Atmel SAM architecture what are common between all architectures and finally third party libraries Each architecture
6. E atp 250db_conf c D Config h H ee cont h dims_emu_coord c gt g W dims_emu_coord h Lise niaior alr en La E Output 6 6 PLC application example 4 PLC Network In this chapter the example proposed is used to show the capabilities of the SAM4CP16C in a network of smart devices One SAM4CP16CMB board acts as a Coordinator i e the device that controls the whole network whereas the other one SAM4CP16CMB board acts as Device Atmel provides a G3 PLC library with some basic PAN Coordinator features APPS_DLMS_EMU_COORD_APP application such as creating the Network and accepting all Network Join from the Devices This way it is possible to build a network so data can be exchanged Atmel SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 85 6 6 1 6 6 2 6 6 3 86 gt This is just a basic implementation for demonstration purposes and it cannot be taken as the reference to build a complete PAN Coordinator APPS_DLMS_EMU_COORD_APP and APPS _ DLMS EMU_DEV_APP are template applications intended to hold the application code developed by the user along with the Atmel G3 PLC Stack So the user can integrate his application code in the firmware package delivered by Atmel They are provided for IAR and Atmel Studio Following sections explain to you how to install the PC tool select the projects supplying the boards select the COM ports to communicate wi
7. V Close page after project load v Show page on startup ine es Solution Explorer Show output from i ala l E To avoid problems depending on the length of the path with Atmel Studio we recommend install the evaluation kit contents in the root C And now you can open the G3 workspace for SAM4CP16C platform sam4cp716c_PLC_examples atsin For that you have to click on Open Project or on File gt Open gt Project Solution on the Start page and select the project in the folder Software G3_va b c_CENELEC g3 workspace sam4cp16c_sam4cp16cmb thirdoarty g3 apps apps _ workspace_sam4cp16c_sam4cp16cmb as_solution sam4co16c_PLC_examples atsin Once you have loaded the workspace you can see the three G3 PLC PHY example projects and both G3 PLC DLMS applications Open the APPS DLMS_ EMU COORD project Once a project is opened the Solution should appear in the integrated development environment as in the figure below 38 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 1 7 1 Atmel File Edit View VAssistX ASF Project Build Debug Tools Window Help Iaa Gdp amp a e EAA Do Debug JEET EPAR EAEE E PTT Bj E i w ATSAM4CP16C0 No Tool HOS Ree gog aim Galo u bls See THe aa pam Solution Explorer X Ykema ASF Explorer VA View gt C Users raul navarro Desktop g3 workspace sam4cpl6c_sam4cpl6cmb
8. gt Disk drives gt AMY Display adapters D gt 4 amp 3 DVD CD ROM drives gt QA Human Interface Devices gt Ca IDE ATA ATAPI controllers gt Jungo lt 2 Keyboards gt JI Mice and other pointing devices gt E Monitors 4 Network adapters AP Broadcom NetLink TM Gigabit Ethernet y Cisco Systems VPN Adapter for 64 bit Windows gt E Portable Devices s Y Ports COM amp LPT A Silicon Labs Dual CP210x USB to UART Bridge Enhanced COM Port COMA ej Silicon Labs Dual CP210x USB to UART Bridge Standard COM Port COM3 gt p Processors gt 4 Sound video and game controllers gt gli System devices gt F Universal Serial Bus controllers As you can see in the figure above the CP210x USB to UART Bridge Virtual COM Port VCP appears as two COM ports Enhanced and Standard COM ports in the Device Manager They are assigned the lowest available COM ports for operation In the SAM4CP16CMB design the Enhanced COM port corresponds to UARTO and the Standard COM port to UART1 so select the Enhanced COM Port when you use the Atmel PLC PHY Tester PC tool 6 2 4 Programming the embedded file The boards of the kit are programmed with the embedded PLC PHY Tester tool firmware for SAM4CP16C device apps_phy tester_tool bin In this chapter we explain how to load an embedded file The process and tools to load the embedded file in the SAM4CP16CMB boards are always the same Remember that all these
9. Added R23 to control impedance input in Non Isolated design First Revision wez sc ev Description Date Author FIDI FID2 cm C8 z 4 7ul 100i File date 10 10 2014 Sheet 1 of 1 moor At mel FID3 FID4 Code number TITLE jm ATPLCOUPO07v2 ATPLCOUPO007v2 gt 3 4 100 SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Atmel ATMEL EVALUATION BOARD KIT IMPORTANT NOTICE AND DISCLAIMER This evaluation board kit is intended for user s internal development and evaluation purposes only It is not a finished product and may not comply with technical or legal requirements that are applicable to finished products including without limitation directives or regulations relating to electromagnetic compatibility recycling WEE FCC CE or UL Atmel is providing this evaluation board kit AS IS without any warranties or indemnities The user assumes all responsibility and liability for handling and use of the evaluation board kit including without limitation the responsibility to take any and all appropriate precautions with regard to electrostatic discharge and other technical issues User indemnifies Atmel from any claim arising from user s handling or use of this evaluation board kit Except for the limited purpose of internal development and evaluation as specified above no license express or implied by estoppel or otherwise to any Atmel intellectual property right
10. La Libraries THIS SOFTWARE IS PROVIDED BY ATMEL AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE I src fy APPS_PHY_TESTER_TOOL Sa Dependencies Sa Output Files La Libraries gt i src asf_license_stop rm APPS VEVE PE TETT CONSCEE Sa Dependencies Sa Output Files lt j Libraries sre FindResultsl cee Output Window Magee Melia Find Results 1 Let s have a closer look at the environment now Basically the environment is split into three different areas e Atmel Studio Editor allows you to edit the source files e Solution Explorer shows the project structure e Output Window displays messages from the GCC compiler In the solution explorer window you can see the G3 PLC project structure expand the tree struc
11. and the common directory is split into several subdirectories these directories contain the various modules boards drivers components services and utilities See the list below and Figure 6 4 for an overview of how the various modules are wired together e Boards contain mapping of all digital and analog peripheral to each I O pin of Atmel s development kits e Drivers is composed of a driver c and driver h file that provides low level register interface functions to access a peripheral or device specific feature The services and components will interface the drivers e Components is a module type which provides software drivers to access external hardware components such as memory e g Atmel DataFlash SDRAM SRAM and NAND flash displays sensors wireless etc e Services is a module type which provides more application oriented software such as a USB classes FAT file system architecture optimized DSP library graphical library etc e Utilities provide several linker script files common files for the build system and C C files with general usage define macros and functions e Applications provide application examples that are based on services components and drivers modules These applications are more high level and might have multiple dependencies into several modules Figure 6 4 ASF modules structures Atmel SAM4CP16C EK Kit User Manual USER GUIDE 33 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_2
12. routines Co processor CM4P1 provides ability to separate application communication or metrology functions e ARM Cortex M4F running at up to 120 MHz e IEEE 754 Compliant Single precision Floating Point Unit FPU e DSP Instruction set e Instruction and Data Cache Controller with 2 Kbytes of Cache Memory e Memories 16 Kbytes of Embedded SRAM SRAM1 for Program Code I Code bus and Program Data D Code bus and System bus 8 Kbytes of Embedded SRAM SRAM2 for Program Data System bus Symmetrical Asynchronous Dual Core Architecture e Interrupt based Interorocessor Communication e Asynchronous Clocking e One Interrupt Controller NVIC for each core e Each Peripheral IRQ routed to each NVIC Input G8 PLC Transceiver e Implements G3 CENELEC A FCC and ARIB profiles ITU T G 9903 June 2014 e Power Line Carrier modem for 50 and 60 Hz mains e G3 PLC coherent and differential modulation schemes available e Automatic Gain Control and continuous amplitude tracking in signal reception e Embedded PLC Analog Front End AFE requires only external discrete high efficient Class D Line Driver for signal injection Cryptography e High performance AES 128 to 256 with various modes GCM CBC ECB CFB CBC MAC CTR e TRNG up to 38 Mbit s stream with tested diehard and compliant with the American FIPS Publication specification e Classical Public Key Crypto accelerator and associated ROM library for RS
13. 6 1 IDE tools are presented to create build program and debug your application Chapter 6 2 describes a simple PLC application that lets you check the device communication in a point to point connection PHY layer example Chapter 6 3 describes the PHY TX Test Console application which lets you configure a proper setup to perform both EMC emissions and immunity tests on SAM4CP16CMB board Chapter 6 4 describes the G3 PHY Sniffer project which is able to monitor data traffic on the G3 network Chapter 6 5 describes the G3 PLC Stack and we present you the structure of a G3 PLC project and how to create a final application Finally chapter 6 6 explains the setup and operations required to create a smart PLC network using the included G3 PLC Device example and G3 PLC Coordinator example This network communicates by means of G3 PLC Note The software described in this manual is under the Atmel s Evaluation License Agreement pdf document You can find it in the Software folder 6 1 Introduction to the integrated development environment The purpose of this section is to guide new users through the initial settings of IAR Embedded Workbench or Atmel Studio and compile a G3 project The section shows setup of a G3 project to generate a debug target that can be loaded into the microcontroller Kit projects are supported by IAR 7 40 or AS 6 2 versions or above From this point on it is assumed that a working copy of these IDE is install
14. ATPLCOUP007 is connected to SAM4CP16CMB Voo voltage must be 12 volts to avoid damaging the coupling board so jumper in J20 must be set See section 3 5 1 and Figure A 2 By default the jumper is placed Figure 4 3 Vpp selection in SAM4CP16CMB board Jumper configuration Jumper J20 Atmel SAM4CP16C EK Kit User Manual USER GUIDE 27 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 5 1 5 2 5 3 28 ATPLCOUP006 Hardware Overview ATPLCOUP0O06 is a PLC coupling board designed to communicate in ARIB and FCC bands especially from 151 to 472 KHz channels 3 4 5 6 7 and 8 ATPLCOUP006 mounts a double branch with voltage isolation from mains to the PLC coupling driver board The goal of this design is provided to the cus tomers with a full performance transmission board in FCC band This board is not set by default in the SAM4CP16CMB board of the SAM4CP16C EK Figure 5 1 FCC and ARIB bands 3 kHz 73 kHz 7 3 kHz 7 3 kHz 7 3 kHz 7 3 kHz 7 3 kHz kHz 42 89 97 144 151 198 206 253 261 308 315 362 370 417 424 471 F Features The ATPLCOUPO06v1 board includes the following features e Specially designed to communicate in ARIB and FCC frequency bands 151 367 471 68 kHz e Voltage Isolation from mains with a transformer VAC 160403K5024X044 soldered in top layer board e Double branch each one for a range of impedances Low impedance optimized High impedance optimiz
15. At the bottom of the tab it s necessary to select a choice between Transmision and Reception test Product Info Product Id SAM4C 16C G3 CENELEC A Model Id 0x0001 Firmware Id 0x25010201 Transmission Reception Verify Coupling ida Warning The coupling board plugged in the main board must be the proper one a Check the coupling identifier that you can find in the coupling board If current coupling is not the proper one for binary flashed please remove it and connect the proper one Also verify that Vdd is the correct for the coupling board selected Otherwise the board could be seriously damaged Atmel Enabling Unlimited Possibilities The Product Information Tab shows basic information of the type of board connected to and also asks the user to select the kind of test to be performed Showed information is related to the physical layer implemented in the firmware of the board e Product ID it shows a text string that identify the Atmel PLC product platform e Model ID It is a 16 bit unsigned integer that identifies the model of the board e Firmware ID It is a 32 bit unsigned integer that identifies the physical layer firmware running in the board Now the user has to do a selection depending on whether the user selects transmission or reception test different tabs are added For reception tests Reception Parameters and Rx Test Parameters tabs are added For transmission tests Transmissi
16. J20 jumper position In this situation jumper J20 must set See section 3 5 1 and Figure A 2 for more information Other coupling boards may require different voltage for the class D amplifier Vpp Once the application is launched Starting Window will appear see Figure 6 30 Figure 6 30 Welcome instance K Atmel PLC PHY Tester Tool v2 4 2 Lo e 2 Welcome Summary Welcome to Atmel Multiplatform PhyTester this application allow you to test basic functionality of Atmel PLC products Please select the serial port in wich your Atmel board is connected to your PC Connection LLG 3 HALAL 100 ALGOA 010 161 ia 141616678 BaudRate Serial Port Atmel Enabling Unlimited Possibilities The first to do is configure the corresponding COM port for each board In this window we select the serial connection configuration e Select in the Serial Port combo box the proper port to connect see Figure 6 31 As it is explained in section 6 2 3 communication is by the Enhanced COM UARTO If your COM port does not appear see section 6 2 3 press Find Ports button e Select the BaudRate combo box of 115200 bauds Atmel SAM4CP16C EK Kit User Manual USER GUIDE 51 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 31 Serial port selection Connection Serial Port COMA Standard COMS Enhanced BaudRate acter NSA Once COM port is selected click the Connect
17. Manual USER GUIDE 79 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 70 G3 PLC stack G3 PLC Stack Adaptation Layer IETF RFC 4944 MAC Layer IEEE 802 15 4 PHY Layer ITU T G 9903 The Atmel G3 stack is able to run on a system with an OS the OS Wrapper is an abstraction layer so different OSS can be used or without it running in microcontroller mode The OS intends to transform the microcontroller mode operation into a task mode operation typical of operating systems In order to do that it creates and manages a single task where all active layers and interfaces are included The user does not need to take care of controlling how the G3 stack is running and can create their applications normally The current implementation of the OSS is based on FreeRTOS but the user could modify it appropriately to use any other RTOS The Atmel G3 stack is according to the following architecture e PHY Layer PHY layer is in charge of frame transmission and reception this layer will be interrupt driven with events coming from PLC transceiver peripheral Interrupt events will occur while transmitting and receiving frames Apart from these events PHY layer will implement entry functions in order to transmit a frame using the PLC modem and to access the PHY Information Base PIB to read write or modify parameters e PAL This layer abstracts the interface of the SAM4CP16C PHY Layer developed by Atme
18. Manual USER GUIDE 81 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Software g3_va b c_CENELEC g3 workspace sam4cp16c_sam4cp16cmbithirdparty g3 apps apps _ workspace_sam4cp16c_sam4cp16cmb Once you have loaded the workspace open the APPS DLMS EMU COORD_APP project Atmel provides a G3 PLC library with some basic PAN Coordinator features such as creating the Network and accepting all Network Join from the Devices This way it is possible to build a network so data can be exchanged k This is just a basic implementation for demonstration purposes and it cannot be taken as the reference to build a complete PAN Coordinator In order to ease the integration of the user app code into the Atmel G3 PLC firmware stack the stack just requires developing some user functions and files accordingly to the structure of the firmware stack The Figure 6 72 shows the G3 project structure for the SAM4CP16C according to the ASF structure Workspace package is divided in 3 folders common sam and thirdparty Common and sam contain generic drivers and components for Atmel microcontrollers Thirdparty folder contains CMSIS folder where ARM Cortex interface is located freertos folder where the porting of freertos to Atmel microcontrollers can be found and g3 folder where all the G3 PLC stack and example applications code is located Under g3 folder there is basically one folder for each layer of the G3 stack plus IPv6 p
19. Software amp Documentation Pack The J Link SAM ICE JTAG software and documentation pack includes e GDB Server Support for GDB and other debuggers using the same protocol GUI amp command line version e J Link Configurator Free utility to manage a various number of J Links connected to the PC via USB or Ethernet e J Link Commander Simple command line utility primarily for diagnostics and trouble shooting Atmel SAM4CP16C EK Kit User Manual USER GUIDE 31 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 e J Link Remote Server Free utility which provides the possibility to use J Link J Trace remotely via TCP IP e SWO Viewer Free tool which shows terminal output of the target performed via SWO pin e J Mem Memory viewer e J Link DLL Updater Allows updating 3rd party applications which use the J Link DLL e Free flash programming utilities Simple command line utilities which allow programming a bin file into the internal external flash memory of popular evaluation boards e USB driver Includes driver for J Links with CDC functionality e Manuals UM08001 J Link User Guide UM08003 J Flash User Guide UM08004 RDI User Guide UM08005 GDB Server User Guide UM08007 Flasher ARM User Guide e Release notes for J Link DLL J Flash and J Link RDI DLL e J Flash including sample projects for most popular evaluation boards e J Link RDI Support for ARM RDI standard Makes J L
20. VDDIO and or VODCORE due to floating input the internal pull up resistor corresponding to this PIO line must be enabled Please refer to the SAM4CP16C datasheet for a further description of JTAG debug port 3 5 5 3 Debugging UARTs SAM4CP16C uarts UARTO and UART1 are user accessible by means of micro USB type B connector J9 Figure A 8 A single chip bridge is used to convert UARTs CMOS to USB levels U8 Figure A 8 Note that this bridge is powered from USB 5V power supply so it is only available when USB cable is attached to any other USB host port That single chip drive CP2105 F01 GM of Silicom Labs has two ports The enhanced port is connected to UARTO and the standard port is connected to UART1 Furthermore UARTO and UART1 CMOS signals are also available in a triple row male connector J16 Figure A 8 If this interface is used the USB port must remain unconnected to avoid collisions It is possible to power SAM4CP16CMB directly from USB connector However due to power limitations this option does not allow PLC transmissions Nevertheless this option is very useful for several applications such FW downloading or debugging 24 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 3 5 5 4 Xplained PRO Master Xplained Pro is an Atmel s proprietary interface port intended to connect different development boards such as metering and PLC communication boards Thi
21. after the hardware initialization void oss_init void Step 4 Set user App function pointers OSS file is in charge of controlling all program flow Atmel SAM4CP16C EK Kit User Manual USER GUIDE 87 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Step 5 Start execution oss_ Start function in microcontroller mode this mode will be used to explain the different functions and processes involved in program execution 6 6 3 2 EUI64 Every device in a G3 network needs a unique EUI64 to be identified This EUI64 or extended address is stored in the variable CONF_EXTENDED_ADDRESS which has a default value the same for every device so a mechanism to ensure that different devices take different EUI64s is required Mechanism to store expected sequence and EUI64 in flash memory is not provided as it is expected to be done when flashing the device For more information about EUI64 initialization see doc43081 6 6 4 Running the PLC application example 4 For this example the boards are plugged into the same power line One board is the Coordinator and the other one is the Device Users have to execute an instance of the serial interface tool which has been previously installed to the host PC in order to enable communication with Coordinator board For this example a serial interface tool is required HyperTerminal is not installed on Windows 7 You can use a PuTTY terminal instead Once you have the seri
22. amp USART1 amp TWI i H UARTO amp UART1 SAM4CP16C Mechanical and user considerations This development board is directly powered from mains grid so hazardous voltage is present on the board To avoid user access to dangerous parts SAM4CP16CMB must always be used in its enclosure All required connectors and configuration jumpers are easily accessible without removing the enclosure cover A normal use of the SAM4CP16CMB does not require removing the enclosure cover If this action is necessary it must be performed by qualified staff being sure that mains connection has been previously removed SAM4CP16CMB is a CE mark product which passes EN60950 1 safety standard and EN50065 1 EN50065 2 3 EN600065 7 EMC standards It also satisfies Pb Free and ROHS directive SAM4CP16CMB supply voltage is taken from mains grid 100 230Vac 50 60Hz J1 connector SAM4CP16CMB dimensions are 165mm x 114mm x 30mm LxWxH and the enclosure dimensions are 179mm x 130mm x 50mm LxWxH The operating temperature range is about 10 to 85 C Hardware description In this section the modules of the SAM4CP16CMBv1 board are described Take into account that the board s BOM is not a final design so they include devices that could be no necessary in the customer designs once the design has been optimized Hardware files are contained in the Hardware folder Hardware HW SCH amp PCB SAM4CPI6CMBv7 SAM4CP16C EK Ki
23. broadened portfolio of Atmel SAM3 ARM Cortex M3 and M4 Flash devices 30 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 1 Atmel Studio 6 Atmel Download the latest version from the following link http www atmel com microsite atmel_ studio6 6 1 3 Atmel SAM ICE JTAG Probe Atmel SAM ICE a dedicated Atmel J Link version is a USB powered JTAG emulator supporting Atmel ARM based microcontrollers Atmel SAM ICE is a JTAG emulator designed for SAMA5 SAM3 SAM4 SAM7 and SAM9 ARM core based microcontrollers including the Thumb mode It supports download speeds up to 720 Kbytes per second and maximum JTAG speeds up to 12 MHz It also supports Serial Wire Debug SWD and Serial Wire Viewer SWV from SAM ICE hardware V6 SAM ICE support is integrated in most professional integrated development environments IDEs such as IAR and many others More details are available here http www atmel com tools ATMELSAM ICE aspx Figure 6 2 Atmel SAM ICE JTAG Note Evaluation kit does not provide an Atmel SAM ICE To use Segger tools with Atmel Studio 6 2 download Atmel s latest USB driver driver atmel bundle 7 0 712 exe from the following link https gallery atmel com Products Details 07bf1 6c1 444f 4ac8 8f40 9d4005575dca or take it from the PC Tools folder PC Tools USB_ Drivers And install the file 6 1 4 J Link SAM ICE JTAG Probe
24. cnc Another important feature is to disable the optimization in Atmel Studio 6 editor when you are in Debug mode to avoid jumping into the lines of code without order due to the optimization For that e Access to Project Properties by clicking on Project gt APPS DLMS EMU COORD Properties and access to Joolchain window in the Project Properties tab e Select Optimization option in ARM GNU C Compiler main tree e Select None option in the display Optimization Level function Figure 6 11 Optimization option window File Edit View VAssistX ASF Project Build Debug Tools Window Help a Aad AH 2 B 9 C AA D dw Debug l G3 PTT i JCEITEEME E iMORKVE SOK sim A alona ss CR ee THe si J Sy i i l i a ATSAMACPIECO 7 No Too conf_project h conf_project h main c APPS_DLMS_EMU_COORD_APP x X ASF Explorer VA View gl Solution sam4cp16c_PLC_examples 5 projects p p proj a 4 APPS_DLMS_EMU_COORD_APP Sa Dependencies Configuration Manager aj Output Files ka Libraries Configuration Active Debug Platform Active ARM Build Events Toolchain 4 E ARM GNU Common ARM GNU C Compiler gt Optimizati General Tool Outputfiles Optimization Level 4 E ARM GNU C Compiler Advanced General Preprocessor EX Symbol i dart TEk 5 Syra ols Prepare functions for da Optimize most 03 freertos 4 Veruggmg Enable unsafe math optimizate ores SP
25. configuration values Press v key of keyboard to check default configuration e e Execute transmission application Press e key in the keyboard to begin transmission and reception mode in both boards And press x key of keyboard to stop the transmission process Default configuration is configured for ready for EMC tests e TX level 0 OdB of attenuation e Modulation Scheme 3 It means Differential Robust e Time period 5400 5400us between messages to transmit e Data 1 It is Random Data to transmit of 133 bytes 133 bytes is the maximum for Robust mode in CENELEC e TX tone map Ox3F e TX preemphasis 0 68 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 52 Default configuration menu ICi Mm m t e m 0 9 t j na ps a l AA tE t om S i mM ER EA i ER a ES in tin Ww f j Note In file is the possible values of the parameters from main menu fields Figure 6 53 Transmission messages n EP COMT PuTTY 1 amp t t mM m m m i t j es to tcransm t us e _ a a ct c om m l om mom M 0 t tree t t 4 We we Oc A ht oo j in in Ww eE ee mo te lt finish transmission t Aiid v ee Cn er et AA o o Default configuration is configured for ATPLCOUP007 coupling board for differential modulation scheme in Robust mode wi
26. differential or coherent It indicates the type of modulation BPSK QPSK 8PSK or BPSK_ROBO It indicates active sub bands in the frame It indicates the strength of the signal received in dBuV It is a parameter that indicates the mean SNR per carrier dB SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 63 Transmission parameters showed Reception parameters showed Tx It is the interval of time between the transmission of the current frame Data It is the received info in ASCII format Interval and the previous one Rx It is the interval of time between the reception Interval of the current frame and the previous one Payload It shows if the content of the frame is correct Integrity or not After all frames have been transmitted received or the test has been cancelled at the bottom of the tab it will appear a text box with information about the test First of all it will appear information about starting and ending time this information is measured by the PC application After that there is a section of information called Frame Error information that shows information about transmitted received frames and possible errors Finally another section shows a resume of the transmission reception tests this information contains much information as modulation scheme message length total frame received that is pretty straightforward but other fields must
27. for and will not be used in connection with any applications where the failure of such products would reasonably be expected to result in significant personal injury or death Safety Critical Applications without an Atmel officer s specific written consent Safety Critical Applications include without limitation life support devices and systems equipment or systems for the operation of nuclear facilities and weapons systems Atmel products are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military grade Atmel products are not designed nor intended for use in automotive applications unless specifically designated by Atmel as automotive grade
28. gt gf DVD CD ROM drives D 5 Human Interface Devices gt qj IDE ATA ATAPI controllers gt amp P Jungo b lt 2 Keyboards D F Mice and other pointing devices gt ME Monitors P Network adapters ME Default Settings l sso gt Broadcom NetLink TM Gigabit Ethernet Co aragonproject iMg Cisco Systems VPN Adapter for 64 bit Windows ko Portable Devices J Ports COM amp LPT aN 7 Silicon Labs Dual CP210x USB to UART Bridge Enhanced COM Port COM4 TF Silicon Labs Dual CP210x USB to UART Bridge Standard COM Port COM3 3 i Appearance i Load save or delete a stored session fe j Saved Sessions D a Sound video and game controllers is gt gi System devices b Universal Serial Bus controllers Close window on exit 3 C Aways Never Only on clean exit Set 115200 in the Speed field In the Serial Category change the Flow Controlto None The other fields should already be correctly configured Finally click Open SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 49 PuTTY Configuration instance fre PuTTY Reconfiguration as Options controlling local serial lines Configure the serial line Speed baud 115200 Data bits 8 Window Stop bits 8 1 pis ipa Flow control In order to know if the boards were programmed successfully
29. in order to know how to supply the SAM4CP16CMB board 6 4 3 USB connection Please refer to 6 2 3 in order to know how to connect the micro USB cable with the SAM4CP16CMB board 6 4 4 Programming the embedded files We have commented in section 6 2 4 the way to program a board To program the board as PLC sniffer process will be the same building the IDE project and downloading into the board Atmel SAM4CP16C EK Kit User Manual USER GUIDE 73 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Open the IDE tool used Atmel Studio or IAR Embedded Workbench Select the PHY sniffer tool project apps_phy_sniffer_tool atsin or apps_phy_sniffer_tool eww and now build it to generate the output file Note that kits do not provide a J Link ARM or SAM ICE JTAG probe in order to connect to the user s host PC and the boards to download and debug the projects Remember that every PHY example project is contained in the following Software folder Software G3_va b c_CENELEC 93 workspace sam4cp16c_sam4cp16cmb thirdparty g3 phyl atpl250 apps And also you can find all of them in the workspace project sam4cp16c_PLC examples which is contained in following Software folder Software G3_va b c_CENELEC g3 workspace sam4cp16c_sam4cp16cmb thirdparty g3 apps apps_workspace_sam4cp16c_sam4cp16cmb Remember that the J Link USB drivers must have been downloaded previously from the Segger webpage see section 6 1 4 and they dep
30. n BR 3 pS o E sam4cp16c_PLC_examples La GENT p fl se Ha Eimon section Usage Ha Osam Ha Gi thirdparty Haa ae eg a adp aG apps Atmel library includes LaO dms emu_coord_app include asf h i Ha G sam4cp16c_sam4cp16ernb Editor F Config h g Tons irae ei anol zy E dims_emu_coord c include conf_project h f E dlms_emu_coord h Application ude La E main c include a emu E coord window Ha G bootstrap Workspace Et orion Function declarati 7 window pams Ha Omac ap Ha Doss while 1 Hapal aa l void HardFault_Handler void Giphy Ha Gatpizs0 Bye Ha G addons brief Main code entry point HaCiinclude 77 HAG module_config om main void z E atpl250db_conf c L F atpl250db_conth Initial Loa source os3_ini aie E ea Configure OSS _ IF poe 038_set_app_i TEE rt_ erie _ base niy Ha apps_dims_emu_dev_app_flash Debug v nee wae ei sacacnnn ella ee aa Ha g apps_phy_sniffer_tool_flash Debug v stig ata m a eS a A v v Ha apps_phy_tester_tool_flash Debug La g apps_phy_tx_test_console_ flash Debug Start OSS oss_start Overview Messages File Line apps_dims_emu_coord_app_flash apps_dims_emu_de 4 Message window D amp Build Debug Log Stat u S Reade s Errors 0 Warnings 0 Ln 84 Coll Syste
31. ome J o o d oa 3 5 4 Peripherals These peripherals are not necessary to implement in a G3 device they are included to show some features of the SAM4CP16C for a customer designs 3 5 4 1 External Memories SAM4CP16CMB board includes a Flash Memory connected mean a SPI interface U3 U14 Figure A 7 SAM4CP16CMB board includes the possibility to mount a serial EEPROM memory connected by Two Wires Interface U2 Figure A 7 with the SAM4CP16C Please refer to AT24Cxx datasheet for a further description on Atmel s website It is not mounted by default 3 5 4 2 SAM4C MCU Real Time Clock and back up battery Real Time Clock RTC embedded peripheral in SAM4CP16C microcontroller can be used as calendar and time base counter A back up battery Figure A 4 slow clock crystal and low power modes are required to keep the RTC running during power down or mains unplugged conditions 99 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 The SAM4CP16CMB includes a Battery BT1 Figure A 4 for maintain active the RTC when the power supply of 3v3 shutdown and SAM4CP16C enters in a low power mode J18 jumper lets us supply the board with the battery setting the jumper between VDDBU and BATT position Figure 3 9 J18 jumper in battery position ry R gt By default jumper J18 sets VDDBU to 3V3 supply 3 5 4 3 Voltage Monitor SAM4CP16CMB monitors Von and 5V voltage rails to de
32. test may be inaccurate In both board s displays the transmitted received messages are showed During the transmission process the TX led of coupling board is toggled You can use it to check if the PLC messages are sent When all frames are sent both Test Executions windows show some statistics and both board s displays show the test results See the following figures Atmel SAM4CP16C EK Kit User Manual USER GUIDE 61 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 62 Figure 6 44 Transmission test result Frame xResult RMS_Calc Modulation Type Modulation Scheme Tone Map Tx Succesful 196887880 BPSK MOD_SCHEME_DIFFERENTIAL 0x3f Tx Succesful 198379378 BPSK MOD_SCHEME_DIFFERENTIAL 0x3f Tx Succesful 198609193 BPSK MOD_SCHEME_DIFFERENTIAL 0x3f Tx Succesful 198305330 BPSK MOD_SCHEME_DIFFERENTIAL Ox3f Tx Succesful 198327335 BPSK MOD_SCHEME_DIFFERENTIAL Ox3f Tx Succesful 198490229 BPSK MOD_SCHEME_DIFFERENTIAL 0x3f Tx Succesful 198303227 MOD_SCHEME_DIFFERENTIAL Ox3f Tx Succesful 198541799 MOD_SCHEME_DIFFERENTIAL Ox3f Tx Succesful 198428020 MOD_SCHEME_DIFFERENTIAL Ox3f Tx Succesful 198654316 MOD_SCHEME_DIFFERENTIAL 0x3f Frame Error Info Total Frames Transmitted 100 Total Bytes Transmitted 4600 Phy Layer Error Frames 0 Frames Not Transmitted due to Busy Tx 0 Frames Not Transmitted due to Busy Channel 0 Frames Not Transmitted due to Bad Format
33. 0 Frames Not Transmitted due to Timeout 0 Tx Test Bandplan CENELEC A Modulation Scheme Differential Modulation Type BPSK Message Atmel Enabling Unlimited Possibilities Frame Symbols 41 Frame Duration 34 575 ms Tx Mean Interval 107 60 ms Effective Baudrate Peak 9024 bps Effective Baudrate Real 2900 bps Raw Baudrate Peak 42690 bps Raw Baudrate Real 13718 bps Channel Usage 32 13 Atmel Enabling Unlimited Possibilities SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Data Atmel Enabling Unlimited Possibilitie Atmel Enabling Unlimited Possibilitie Atmel Enabling Unlimited Possibilitie Atmel Enabling Unlimited Possibilitie Atmel Enabling Unlimited Possibilitie Atmel Enabling Unlimited Possibilitie Atmel Enabling Unlimited Possibilitie Atmel Enabling Unlimited Possibilitie Atmel Enabling Unlimited Possibilitie Atmel Enabling Unlimited Possibilitie T Atmel Figure 6 45 Reception test result Reception Parameters Rx Test Parameters Frame Modulation Type Modulation Scheme BPSK MOD_SCHEME_DIFFERENTIAL 0x3f BPSK MOD_SCHEME_DIFFERENTIAL 0x3f BPSK MOD_SCHEME_DIFFERENTIAL 0x3f BPSK MOD_SCHEME_DIFFERENTIAL 0x3f Configuration Summary Tone Map RSSI dBuV Link Quality LQI in dB TestExecution Data 18 25 Atmel Enabling Unlimi 18 25 Atmel Enabling Unlimi
34. 1 Time 6687 OK Cycles OK Cycle summary cycleId 7 cycleTime 743377470 ul absolute time 20686053 node ID success errors availabiltyTimeCycle node ID 0x000i1 Success 14 Errors 0 Availability 100 TimerCycle 8955 information about the DLMS Emulation procedure see the Atmel G3 Firmware Stack Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 7 References 1 CENELEC EN 50065 1 Signaling on low voltage electrical installations in the frequency range 3 KHz to 148 5 kHz 2 Narrowband OFDM PLC specifications for G3 PLC networks 2014 3 doc43081 Atmel G3 firmware stack user guide 2015 4 doc43080 SAM4CP16C Datasheet 2015 5 doc43052 PLC coupling reference designs 2015 Atmel SAM4CP16C EK Kit User Manual USER GUIDE 91 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Appendix A Board schemes A 1 SAM4CP16CMBv1 schemes This section contains the schemes of the SAM4CP16CMB multipurpose board e Top level scheme e Power supply scheme e SAM4CP16C e SAM4CP16C Power supply e PLC Coupling transmission scheme e PLC Coupling reception scheme e Peripherals e Interface e Components location in top and bottom layers 92 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure A 1 SAM4CP16CMB Top level scheme A A Top Level Xplained PRO U_Power Supp
35. 13 LCD message with PHY tester tool application binary programmed Atmel SAM4CP16C EK Kit User Manual USER GUIDE 41 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 2 42 Figure 6 14 Atmel Studio 6 2 window sam4cp16c_PLC_examples Debugging AtmelStudio File Edit View VAssistX ASF Project Build Debug Tools Window Help 7 n m n oa aa edak aala e ag AA Dw debug ll T __ IRARRETA LOCAT ow Gli Rh ald ou db o Ga T Han GS A yw N o watsammcrioco 7 JTAG on SAM ICE 28015070 oss_start while if ey 431 ial Solution sam4cp16c_PLC_examples 5 projects User defined initialization a h APPS_DLMS_EMU_COORD_APP if pf_app_init_cb NUL b Ea Dependencies pf_app_init_cb 436 437 G if NUM_PORTS 0 438 usi_init 439 endif 440 main loop while 1 i CMSIS Reset watchdog fia freertos RESET_WATCHDOG 3 m_flag_call_p gt adp defined initialization 4 apps if pf_app_process_cb B dims_emu_coord_app pf_app_process_cb 4 sam4cpl6c_sam4cpl6cmb Gl conf_platform h a conf_project h if platfor User if NUM_PORTS usi_process endif G3 stack process ifdef OSS_G3_ADP_MAC_SUPPORT AdpEventHandler Internally calls MAC and PHY Event handlers endif Handle TCP IP events ifdef OSS_ENABLE_IPv6_STACK_SUPPORT netTask endif H atpl250db_conf c W atpl250db_conf h
36. 18 25 Atmel Enabling Unlimi E 18 25 Atmel Enabling Unlimi bai m 3 LIVIE To CIT re os ere Frame Error Info Total Frames Received 100 Total Bytes Received 4600 Total RS Error Frames 0 Total Exceptions Errors 0 Frames Received with Bad FCH CRC 0 Total Frames Bad Payload 0 Total Frames Received OK 100 Atmel Enabling Unlimited Possibilities Cancel While tests are executing a row is added to the top table with information about the frame currently transmitted received The columns that contain these tables are the following Table 6 1 Transmission parameters showed Parameter Description TX Result Modulation Scheme It indicates the number of frame transmitted It is useful to track the test progress It indicates the result of the trans mission process If an error occurs a descriptive text will appear It indicates if modulation scheme is differential or coherent It indicates the type of modulation BPSK QPSK 8PSK or BPSK_ROBO Modulation Type Tone It indicates active sub bands in the RSSI Map frame It shows the message transmitted in Atmel Transmission Reception parameters showed in columns Reception parameters showed Parame ter Modula tion Scheme Modula tion Type Tone Map Description It indicates the number of frame received It is useful to track the test progress It indicates if modulation scheme is
37. 2 SAMTEC FTR 124 54 L S The ATPLCOUP0O07 board is directly powered from mains grid so hazardous voltage is present on the board To avoid user access to dangerous parts ATPLCOUP007 must always be used in its enclosure ATPLCOUPO07 is a CE mark product that passes EN 50065 1 EN 50065 2 3 and EN60065 7 EMC standards see doc43052 It also satisfies Pb Free and ROHS directive Furthermore this coupling design satisfies all ERDF requirements defined in the document Essais PLC G3 except for input impedance out of PLC frequency band ATPLCOUPO0O07 dimensions are 51 5mm x 39 5mm x 18mm LxWxH The operating temperature range is about 40 to 85 C 4 4 Hardware description Hardware files are contained in the Hardware folder Hardware HW SCH amp PCB ATPLCOUPOO07v2 4 4 1 G3 PLC CENELEC channel Single Branch ATPLCOUPO07 is a galvanic isolated reference design which provides a cost optimized PLC coupling reference design in terms of output signal level over a wide range of load impedance values while complying with EN5065 1 EN5065 2 3 and EN5065 7 normatives It supports the frequency band between 35 and 91 kHz of CENELEC A band ATPLCOUP0O07 is composed of only one transmission branch single branch which filtering stage has a flat band pass response with typical field impedances It involves a cost optimization in the BOM For more information see PLC coupling reference designs document doc43052 Take into account that when
38. 3 2 YW Y e G wo RSSI 0 Seq Number 0xCA idFrame TimeStamp DT LQI Duration Delta TMR CC CAP LastSegment SegmentCount Pdulype CmdType SecurityEn SecurityLevel SecFrameCounter KeyIndx SeqNumber D Dest PAN 0x781D Dest Address 0x0000 Src PAN Ox ee eee ee Src Address 0x112233445566778 3 2014 09 2 SOF_RESP 0 68 11 304 1 DAT LBP_JOINING i Security Enabled 0 4 2014 09 2 ACK si we p 3 z p 3 z 0x00 A ask Data Length 12 Data 6 2014 09 2 ACK 0 1529 10 0x00 4 LBP LoWPAN Bootstrap T 0 Code 8 2014 09 2 ACK 0 15 29 142 0x00 EUL 64 0x887766554433221 10 2014 09 2 ACK atk I 0x00 12 2014 09 2 ACK 0 15 29 Hi 0x00 14 2014 09 2 ACK 0 Bay BB 0x00 16 2014 09 2 ACK 0 15 29 487 0x00 egy m a r m z Packet View Column Settings The capture window has a tool bar with two commands see Figure 6 68 e Pause command will stop the update of the scroll view while the logging process will continue e To restart showing the live stream of PDUs click Play button Figure 6 68 Tool bar oo Main window displays a table with the current log It is updated in real time as frames are received from the hardware sniffer The data shown are idFrame Timestamp ModType ModScheme Delimiter Type Symbols SNR RSSI in db uV Duration Delta Tone Map Request Conten
39. 3 Sep 2015 Download link for more information http www atmel com tools AVRSOFTWAREFRAMEWORK aspx Please do not hesitate to visit our web site to get the last library updates 6 1 6 First steps with IAR Embedded Workbench When working with programming in general it is important to have some structure in your coming projects and code IAR Embedded Workbench is made to support such demands The upper abstraction of a task is called Workspace within each workspace you can add projects The projects added ina workspace could be supporting the same device or have something in common Each project contains code and settings for each target So what we need to do is first make a workspace then add a new project to this workspace When this is done you should be able to include an application code to your project and make all the settings for the target SAM4CP16C on your SAM4CP16CMB board IAR Embedded Workbench 7 10 1 version does not support all the SAM4CP core family i e SAM4CP16C Due to this you have to install the provided patches in the kit AR EWARIV ATSAM4CP16C_0 1 1 1 601 zio and I AR EWARM ATSAM4CP16C_1 1 1 1 601 zip The first zip file is the patch for the core 0 and the second one is for the core 1 You can find them in the following directory Software Compiled_Patches IAR Process to install the patches should be 1 Unzip the zip files 2 Open the new folder unzipped 3 Merge the contents of three inside folders con
40. 65 First of all select the Power Line Communication protocol in this case G3 After that select the COM port and set the speed The default port is UARTO enhanced COM port and the speed for this application is 115200 bauds Also this tool is able to connect to a remote device through the TCP IP protocol Atmel SAM4CP16C EK Kit User Manual USER GUIDE 75 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 65 Input Settings window iy Input Settings Connection Serial Port Input TCP IP Input Serial Port Silicon Labs Dual CP210x USB to UART Bridge Enha 115200 NA TCP IP Connection IP 427 0 0 1 Port 50820 Database Initialization Script The database file to store the traffic must be configured If output logs are required and the location to store these choose Configure gt Database Ctrl D A new window Database Settings will appear as shown in Figure 6 66 select the file name and click OK button Database files can hold longer logs without having to split them in pieces Also log stored files can be opened to review the file The three options when you create a log database depends on if you want to keep the previous data or not And it is possible to build your own scripts for example in Python to analyze the data Besides of the log database there are a set of scripts supplied along the ATPL Multiprotocol Sniffer that prepares the database to be able to dec
41. A ECC DSA ECDSA e Integrity Check Module ICM based on Secure Hash Algorithm SHA1 SHA224 SHA256 DMA assisted Safety e Up to four Physical Anti tamper Detection I Os with Time Stamping and Immediate Clear of General Backup Registers e Security Bit for Device Protection from JTAG Accesses e Support to PLC coupling boards ATPLCOUP XXX e Mains zero crossing detector circuit e External Memories Serial EEPROM do not populate 14 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 DataFlash memory e Peripherals Voltage monitor Back up battery holder Users LEDs Force Wake Up switch button Tamper switch button Reset button Liquid Crystal Display e Interface JTAG debugging port Xplained PRO Master Slave Interface UARTs over USB and CMOS levels Control of 3V3 power supply Non lsolated RS485 Daisy Chain Bus Figure 3 2 SAM4CP16CMB multi purpose modem board BN MIMO RS485 eee 5V Buck 3V3 Conveter LDO 12 16V Buck PLC DRIVER 3V3 Conveter y Zero Crossing Detector Transformer Y Ey 4 DDBU PLC FILTER 12 16V SHDN USARTO Atmel SAM4CP16C EK Kit User Manual USER GUIDE 15 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 3 3 3 4 3 5 Block diagram Figure 3 3 SAM4CP16CMB Block diagram SPI1
42. C EK Kit User Manual UserGuide_23 Sep 2015 b ATPL Multiprotocol Sniffer tool to monitor data traffic on G3 networks and gather information of a G3 network c SAM ICE Drivers Users may need to install this driver the first time the SAM ICE is connected to the PC d USB Drivers Silicom usb drivers Users may need to install these drivers the first time the SAM4CP16CMB board is connected to the host PC by means of a serial USB connection We recommend installing the evaluation kit contents in the root C to avoid problems with very long paths Unpack and inspect the kit carefully Contact your local Atmel distributor should you have any issues concerning the contents of the kit The two SAM4CP16CMB boards with the ATPLCOUPO0O07 are encapsulated with enclosures and shipped in protective anti static foam The two coupling boards ATPLCOUP006 are shipped in shielded bags The boards must not be subject to high electrostatic discharge We recommend using a grounding strap or similar ESD protective device when handling the board in hostile ESD environments Avoid touching the components pins or any other metallic elements on the board Note that kit does not provide any battery The coin battery is provided for user convenience in case the user would like to exercise the date and time backup function of the SAM4CP16C device when the board is switched off Figure 2 1 Packed Atmel SAM4CP16C EK 10 SAM4CP16C EK Kit User Manual U
43. C320 e Two SAM4CP16CMBv1 modem C8 boards e Jumpers e Two ATPLCOUPOO7v2 coupling e Two voltage jumpers with pitch boards 5 08 mm e Two ATPLCOUPOO6v1_ coupling e Two erase jumpers with pitch boards 2 54 mm Features e SAM4CP1EC is a flexible compact and high efficient device for a wide range of Smart Grid applications such as Smart Metering Smart Meters and Data Concentrators Lighting Industrial Home Automation Home and Building Energy Management Systems Solar Energy and Plug in Hybrid Electric Vehicle PHEV Charging Stations e SAM4CP16CMB modem board mounts the Atmel SMART SAM4CP16C 32 bit ARM Cortex M4 microcontroller This development board provides a full featured platform to develop a complete communications system over Power Line Communication technology e Evaluation platform performance for the SAM4CP16C to develop a complete communications system based on PLC technology Channel characterization Noise level measurement Sensitivity level measurement Maximum reachable distance Power consumption D SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Possibility to verify the different standard frequency bands complying with the existing regulations CENELEC FCC ARIB setting the different PLC couplings boards Atransformer lets you supplied the board with universal 100 230 Vac 50 60 Hz power input Boards hav
44. Drivers PLC SAM4C family SAM4CP16C boards Hardware board abstraction SAM4CP16CMB We integrate the different parts according to the ASF structure e Boards The SAM4CP16CMB board hardware mapping is defined here e Drivers The drivers for the SAM4C Family e Services We offer the PLC modem as a service e ThirdParty We add in this point the G3 and FreeRTOS libraries It happens that the last version of the Atmel Software Framework provided in the web link at this moment release ASF3 27 September 2015 does not coincide with the PLC libraries of the projects from the kits Software folder PLC libraries of the kit are an above version that ASF You can check the versions of G3 PLC software provided in the kit in g3_stack_version h file Also PHY layer version in atol250_version h file Take into account previous to download futures releases of ASF if it is supported by these kit s version boards In case you do not know the ASF version downloaded in Atmel Studio go to Helo gt Atme Studio Select in the combo box of the new window the component Atmel Software Framework After that all the versions installed are showed 6 5 3 Atmel G3 PLC Stack Structure The Atmel G3 firmware stack follows a layered approach based on G3 PLC specification The Figure 6 70 shows the G3 stack s architecture The stack modules are from the bottom up e PHY Layer e MAC Layer e Adaptation Layer Atmel SAM4CP16C EK Kit User
45. E Solution sam4cpl16c_PLC_examples 5 projects p p proj Files Bh 2 ih APPS_DLMS_EMU_COORD_APP o lsam4cp16c_PLC_examples ai Dependencies ajapps dims _emu_coord app flas ae Caput Fies AMAAN sa Libraries z 4 l src a zon amp ASF o C thirdparty D common J freertos p sam g g3 B thirdparty G adp b E CMSS a 9 apps a freertos LoG dims_emu_coord_app 4 93 gt B adp 4 apps 4 dims_emu_coord_app 4 sam4cpl6c_sam4cpl6cmb apd conf_platform h a conf_project h La sam4cp16c_sam4cp16cmb conf_board h conf_buart_ifth conf_busart_ifth at FreeRTOSConfig h S conf_c42364a_sicdc h gt sj bootstrap conf_clock h b cr common conf_oss h A conf_platforrm h conf_pplc_ifth ioe sons conf_projecth ion conf_sIcdc h a phy conf_sleepmar h E a atpl2s0 F conf_uart_serial h D e addons conf_usi h gt E include fr FreeRTOSContfig h Sa g E dims_emu_coord c al ime remit L fh dims_emu_coord h gt fa studio fa main c a license txt bootstra Sana ep conf_board h ipv6 z iad conf_buart th HaDibs eo ioe sie eae ian Closs id D conf_oss h J pal x W conf_pplc_if h Ee Ga phy W conf_sicdc h g C atpl250 ai conf_sleepmgr h Co addons op conf_uart_serial h include g conf_usi h p module confic
46. Figure 6 58 Installation process slide 3 otocol Sniffer Setup Press Page Down to see the rest of the agreement EVALUATION LICENSE AGREEMENT IT 15 IMPORTANT THAT YOU READ THIS AGREEMENT CAREFULLY AND COMPLETELY This Evaluation License Agreement Agreement is a legally binding agreement between your employer Licensee and Atmel Corporation Atmel By cdicking the I Accept button or by downloading installing or using any of the software available for download Licensed Software you are indicating that you are binding Licensee to the terms of this Agreement and that you are duly authorized by Licensee to do so If you are not authorized to bind Licensee to the terms of this Agreement or if Licensee does not agree to be bound by all of the terms of this Agreement do not cick the I Accept If you accept the terms of the agreement dick I Agree to continue You must accept the agreement to install Atmel ATPL Multiprotocol Sniffer Nullsoft Install System v2 46 Read and accept terms and conditions expressed in the End User License Agreement Click Agree to continue Figure 6 59 Installation process slide 4 p Atmel ATPL Multiprotocol Sniffer Setup Components Choose which features of Atmel ATPL Multiprotocol Sniffer you want to install Check the components you want to install and uncheck the components you don t want to install Click Next to continue 7 M P De i i Select components to install Atme
47. H s ees RBS R TER aHes pee N m fe m Bm i a AL Ut3 C28 voo tC T huen SVCD IC heno A oe igo oe cS C 230VAC CE A 1L5VAC Ea Ea La Figure A 10 SAM4CP16CMB components location in bottom layer Jom tv BMxdrdoamMAe 98 SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Atmel A 2 ATPLCOUPO007v2 schemes This section contains the schemes of the ATPLCOUP007 PLC Coupling board e PLC Coupling transmission scheme e Components location in top and bottom layers Atmel SAM4CP16C EK Kit User Manual USER GUIDE 99 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure A 11 ATPLCOUP007 PLC Coupling Transmission scheme gt 3 4 ATPLCOUP007 v2 G3 CENELEC A Single Branch VDD l A L4 1SuH PLC R20 OR DS B SM6TISCA PLC EMITO l 2 EMITI 3 4 j2 VDD 1 2 Ji 3 MIT4 4 EMIT A EMITS 7 8 9 p 10 ll bs ae sA i4 GND 15 15 gt 16 is 1 PLC I8 18 5 Wes 21 Bis aa 22 PLE a 23 3 2 lt GND OR TP4 GND L3 1QuH 3 1A Q2 Q3 R19 DMN3404L 7 s DMN3404L 7 A RIS TXRX RI Q4 IK Pa BCR07 40 D4 VDD EMITO EMIT EMIT2 D3 j BATS4S Qi 1OuH 1 9A FDC6420 luf R23 C3 OR 2 EMIT lut 22R EMIT4 PLC RX EMITS B D2 P ig BATS4 470uH GND 4 3v3 TPS 33K YELLOW 100 NZ V3 GND av
48. K Kit User Manual USER GUIDE 93 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 94 Figure A 3 SAM4CP16C C39 57 2pF Ed l2pF lt nm 32 768KHz R65 il n r a a ii i i x P Y k iti Shea ee M ked E L3 aS 5 0 ATSAMACP 16x SAG EE Tr vE n r n x ZAF K i ae T M TEF D Sel X E wa 1 3 5 w jj A nae 332 S00 _ SAM4CP16C MLLO ri r V TILA Uo EMIT O 1 moa Set So 8 Q V EE re e En E Y ay a r atic ji M T TR p Ai i ux A l luF C66 10nF Ink AG 2K 3 LOOnE c9 Emm C103 C102 L00nE 11 17 2014 Atmel Code number SAM4CP16xMB e SEEE PEREG 3 ba a e ABEBE GND 3N3 RY 1 4 7uF G ERRE PE 2 8 cs c4 100nF ND Cc n ATSAM4CP 16x SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 2 2uF C6 P C7 LOONE 2K 2 lt 4 DNP DNP A DNEJ AGND 3V3A R96 1 Initial Release Description 11 20 2014 Sheet 4 of 8 Vernea uc Fie_ SAMAOPT6x Ponor Senon SAM4CP16x Power 11 19 2014 Date Author Atmel Code number SAM4CP16xMB Atmel Figure A 5 SAM4CP16CMB PLC Coupling Transmission scheme I 2 3 4
49. Multiprotocol Sniffer tool Installation To install ATPL Multiprotocol Sniffer tool in a Windows Operating System execute the provided installer in the PCTools folder PC Tools ATPL_Multiprotocol_Sniffer ATPL_Multiprotocol_Sniffer_vxX Y Z exe and follow the installation wizard The installer wizard should open To follow the installation click Next ion process slide 1 Figure 6 56 ATPL Multiprotocol Sniffer installat j Sniffer Setup ELLIE Ed 2 paul Choose for which users you want to install Atmel ATPL Multiprotocol Sniffer F Select whether you want to install Atmel ATPL Multiprotocol Sniffer for yourself only or for all users of this computer Click Next to continue Install for anyone using this computer Install just for me Nullsoft Install System v2 46 Select the users permissions and click Next Figure 6 57 Installation process slide 2 yy n a Coty or AL nn E LU Welcome to the Atmel ATPL Multiprotocol Sniffer Setup Wizard This wizard will guide you through the installation of Atmel ATPL Multiprotocol Sniffer Itis recommended that you dose all other applications before starting Setup This will make it possible to update relevant system files without having to reboot your computer Click Next to continue Click Next to continue Atmel SAM4CP16C EK Kit User Manual USER GUIDE 71 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015
50. Program Verify Read Lock bits JLink Config Security a JLink Control Panel Getting Vtarget OK Getting Vtarget OK PHY Tester Tool project of G3_va b c_CENELEC folder has been created for the default PLC coupling board ATPLCOUP007v2 So if you are going to use ATPLCOUPO06v1 coupling board you must use G3_va b c_FCC folder to build the PHY Tester Tool project with the correct configuration For that open the IDE tool used Atmel Studio or IAR Embedded Workbench And open the project application apps _phy_tester_tool atsin or apps_phy_tester_tool eww After that you can select the file conf_project h that it is located in the following project directory Software G3_va b c_FCC g3 workspace sam4cp16c_sam4cp16cmb thirdparty g3 phy atol250 apps phy_tester_tool sam4cp16c_sam4cpi6cmb find the define function to select the coupling board Atmel SAM4CP16C EK Kit User Manual USER GUIDE 49 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 2 5 50 configuration see Figure 6 27 and check the frequency band name is the desired So build to generate the output file Figure 6 27 FCC Frequency band configuration definition Define work band define CONF BAND CENELEC A 49 define CONF BAND FCC 5 define CONF BAND ARIB i amp oo w Check the Table 3 1 for the characteristics of the available ATPLCOUPxxx boards Running the PLC application ex
51. RO and BN MIMO interfaces in SAM4CP16CMB board So if they are used in any other mode rather than LCD segment they have to be disconnected from LCD to avoid damaging its structure because of wrong DC bias voltage Because of these two analog switches U4 and U5 Figure A 7 controlled by PB12 are used as some of LCD segment ports LCD backlight can be controlled with SAM4CP16C GPIO PA29 3 5 5 Interface Ports 3 5 5 1 Reset circuitry SAM4CP16CMB can be manually reset by using a push button SW1 Figure A 8 or by means of an external reset signal available on the Base Node MIMO interface connector This reset restarts the SAM4CP16C include his PLL SAM4CP16C has an asynchronous reset PC6 and a synchronous reset PC7 see Figure A 8 3 5 5 2 SAM4C JTAG Debug Port The SAM4CP16C JTAG interface is available in a standard 20 pin male header J13 see Figure A 8 for debugging and programming purposes The JITAG ICE connector is implemented on the SAM4CP16CMB board for the connection of a compatible ARM JTAG emulator interface such as the SAM ICE from Segger Notes 1 The NRST signal is connected to SW1 system button and also to an external reset signal available on the Base Node MIMO interface connector 2 The 0 ohm resistor R26 may be removed in order to isolate the JTAG port from this system reset signal 3 The TDO pin is in input mode with the pull up resistor disabled when the Cortex M4 is not in debug mode To avoid current consumption on
52. SAM4CP16C EK Kit User Manual USER GUIDE 89 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 78 Coordinator terminal window main menu gee COM265 PuTTY Figure 6 79 Coordinator terminal window statics DLMS EMU DLMS EMU DLMS EMU DLMS EMU DLMS EMU DLMS EMU DLMS EMU DLMS EMU Ox0002 status gt 2 z0001 j result gt DLMS EMU DLMS EMU DLMS EMU DLMS EMU LITS a J DLMS EMU DLMS EMU DLMS EMU DLMS EMU DLMS EMU DLMS EMU DLMS EMU result gt DLMS EMU DLMS EMU DLMS EMU DLMS EMU DLMS EMU For more doc43081 SAM4CP16C EK Kit User Manual USER GUIDE cycleid 6 Ox0001 status DLMS EMU Cycle ld status qyeiela Number of cycle Id cycleltd cyclelid cycleld status cycleld cycle 6 0x0001 Ox000i Address Device Status Ea Cycle summary cycleId 6 cycleTime 678879154 ul absolute time 19491191 node ID success errors availabiltyTimeCycle node ID 0x0001 100 Availability TimerCycle 4551 SLetr yer ay Ui us U D cycleId 7 0x0001 status 0 step i cyclelId 7 0x0001 statis 0 step 2 Availability cycleiId 7 Ox0001 status 0 step 3 cycleId 7 Ox0001 status 0 step 3 cycleId 7 Ox0001 statusi 0 step 3 Number of Cycle ld cycleid 7 Ox0001 status 90 step 4 Cycles NOK cycle 7 DLMS EMU Cycle Summary Ox0002 status gt 2 Number of 0x000
53. SER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 2 2 Unpacked Atmel SAM4CP16C Evaluation Kit Figure 2 3 SAM4CP16CMB and ATPLCOUP007 boards Both SAM4CP16CMB boards are provided with an example application preprogrammed the PHY Tester embedded software After installing the Atmel PLC PHY Tester Tool in your PC users can interface with the device and start exploring its capabilities for example checking the point to point PLC transmissions between the two SAM4CP16CMB boards Take into account that the SAM4CP16C EK provides two coupling boards for CENELEC A band set over the SAM4CP16CMB board In addition to the ATPLCOUPO007 boards evaluation kit adds two coupling boards for FCC bands Atmel PLC PHY Tester Tool lets you send and receive PLC messages with both coupling boards according to the board selected in the PC tool And depending on the board selected you will select the Atmel SAM4CP16C EK Kit User Manual USER GUIDE 11 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 PHY parameters and the PLC channel So that with ATPLCOUP007 board only lets you send and receive PLC messages in CENELEC A band And with ATPLCOUP006 board in FCC bands Please refer to chapter 6 2 for further information Figure 2 4 ATPLCOUP007v2 board CENELEC A band frequency 12 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserG
54. a ks ge Lane ee ee 13 ss VENON eee ee ee E eee ee 13 eS NUS S eens secret esse E E AE A ancavci aca suee E OON 13 T HOCH CACM ae neceececeeaecnees E E E E E E E E 16 3 4 Mechanical and user considerations cccceecccceeecceceeececeeeceeceuececseeececeueceeseueceeseueeeseaeeeeseeeessaeeeesaees 16 35 Hardware description acters ce cess restos tee sna i keia epi in iei ariak E ieit 16 Sal POWs UPDI cesser a cece ae eee ec ei ec cee eee 17 3 5 2 SAM4CP16C Flash Microcontroller ccccccseeccccceeseceeceeeseceeceeeeeceecseeeeceeeseaeceeesaeeeeeesaanes 19 Soe gt PLE OCUPO Renee E ee 20 SA acl 8 2 t een ene eee eee eee ene ee ee ee ee 22 SUS MECE a a9 g cece ee eee eee ee ee ee nee ene ee ee ne ce eee an fener ee een eee ene ner eee ee 24 4 ATPLCOUPO07 Hardware cccccescceseeeecesecenesenesenseensscnesenseeassonssonssonssoassnssonssoaes 26 PeeWee creer E E sec ees A esses cece cana yin beste sane eres A EN 26 Be TS crs ce scene R terse neo ee ls nc oe is ssn wc a es ete alse A ete eterno eee eee 26 4 3 Mechanical and user considerations ccccceecccceeecccceeececeeceecaeececseueceseueceeseuecesseeeeeseueeesseeeessaeeeesaaes 27 4 4 Hardware description saiscsiternd incisor susie dveactseniccaccienalcenenssimensussincwodsise bade eceeebieeavn Useesaieaneadnesbdonessenndexeuicostienceene 27 4 4 1 G8 PLC CENELEC channel Single Branch cccccccccsssseeeeeeeeeeaeeeeeeeeeeeesaaeeeeee
55. ad the file to the board Process to load the output file is commented in sections 6 1 6 1 and 6 1 7 1 b In case the output file has been previously created you can use the Device Programming Instance of the Atmel Studio IDE to load the program in the flash memory In the menu bar go to Tools gt Device Programming Select the tool device and interface and press Apply button Go to Memories window select the output file hex or elf and press Program button When finished power cycle the board to run the program Remember that every PHY example project is contained in the following Software folder Software G3_va b c_CENELEC g93 workspace sam4cp16c_sam4cp16cmb thirdparty g3 phy atpl250 apps And also you can find all of them in the workspace project sam4co16c_PLC_examples which is contained in following Software folder Software G3_va b c_CENELEC g3 workspace sam4cp16c_sam4cp16cmb thirdparty g3 apps apps_workspace_sam4cp16c_sam4cp16cmb Figure 6 26 Device Programming instance a SAM ICE 28011489 Device Programming P z ool Device Interface Device signature Target Voltage SAM ICE x ATSAM4CP16C_0 JTAG Apply 0xA64COCEO 32V Read 2 a a Interface settings Device Tool information Erase Chip 7 Erase now Device information Flash 1024 KB I250 apps phy_tester_tool sam4cp16c_sam4cpl6cmb as5_arm Debug APPS_PHY_TESTER_TOOLhex Y GPNVM Bits Erase Flash before programming e
56. al terminal in your computer open putty exe and connect to the COM port number assigned to the micro B USB cable see Figure 6 74 As is commented in section 3 5 5 3 UART 1 is available by USB connector J9 UART1 CMOS signals are also available in a triple row male connector J16 see Figure 6 75 Remember to select the Standard COM Port UART1 Figure 6 74 COM Port selection lt Device Manager EON eca meses nee PuTTY Configuration LE jia File Action View Help Category m B m Session Basic options for your PuTTY session i a ee Specify the destination you want to connect to gt gli Computer poi Serial line Speed gt ca Disk drives o Tomas zw li Display adapters gt 3 DVD CD ROM drives 3 Connection type gt 3 Human Interface Devices Window Raw Telnet Rlogin SSH Seral Ca IDE ATA ATAPI controllers i i gt 9 Jungo Connectivity o pananda Load save or delete a stored session gt 2 Keyboards fi Saved Sessions gt Mice and other pointing devices Ff a XD Monitors b Network adapters Default Settings Ai d Ports COM amp LPT gt T Processors D Sound video and game controllers gt JE System devices gt Universal Serial Bus controllers 7 Close window on exit O Aways Never Only on clean exit f ews Set 921600 in the Speed field In the Serial Category change the Flow Contro to None The other fields should al
57. ample 1 The Atmel PLC PHY Tester tool is used to control the application running on the SAM4CP16C As you can see in Figure 6 28 the two boards are plugged into the same power line Users have to execute two instances of the PHY Tester tool which has been previously installed in the host s PC s in order to enable communication between both boards Please note that these two instances may or may not run on the same computer Figure 6 28 Atmel PLC PHY Tester concept Power Line In order to know if the boards were programmed successfully you can check the following e The green led LEDO D5 is blinking This indicates that the PHY Tester Tool application is running on SAM4CP16C device e The LCD screen shows the following message G3 PTT Figure 6 29 LCD message with PHY Tester binary programmed as E You must select the same coupling boards to plug in both SAM4CP16CMB boards Check the coupling identifier that you can find in the coupling board SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 These coupling boards must be the proper one for the frequency band you want to send receive otherwise please remove them and connect the proper ones X By default SAM4CP16CMB board sets an ATPLCOUPO0O07 coupling board so Vpp voltage of SAM4CP16CMB must be 12 volts Voo can be regulated to 16 or 12 volts depending on the
58. an create build program and debug the Atmel G3 PLC Examples using the IAR But before to do this you can configure and customize your project as you want i e adding the Output window show the line numbers change the language options etc Tool Output window is available by choosing View gt Messages gt oo Output The Tool Output window displays any messages output by user defined tools in the Tools menu provided that you have selected Atmel SAM4CP16C EK Kit User Manual USER GUIDE 35 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 the option Redirect to Output Window in the Configure Tools dialog box When opened by default this window is grouped together with the other message windows Figure 6 6 Tool Output window Output The Language options are available by choosing ools gt Options Use this page to specify the language to be used in windows menus dialog boxes etc For example it is very useful to enable line number display feature For that show the editor window and tick the Show line numbers options Editor options window is available in ools gt Options In addition to this you can use this window to configure the editor In order to build the project choose a build configuration in the combo box of the workspace window By default the IDE creates two build configurations when a project is created Debug and Release Every build configuration has its own project settings whic
59. and does not require external DAC ADC thus simplifying the external required circuitry Generally Atmel PLC coupling reference designs make use of few passive components plus a Class D amplification stage for transmission Figure A 5 and Figure A 6 show external components required by SAM4CP16C for PLC reception and transmission respectively PLC coupling reference design is composed by the same sub circuits e Coupling Stage e Reception Stage e Transmission Stage e Filtering Stage Figure 3 8 PLC Coupling example RECEPTION STAGE TO MAINS COUPLING STAGE FILTERING STAGE EMIT1 EMIT2 TRANSMISSION Sys STAGE EMITS TXRXO SAM4CP16C 3 5 3 1 Coupling stage The coupling stage blocks the DC component of the line to from which the signal is injected received i e 50 60 Hz of the mains This is carried out by a high voltage capacitor C26 Figure A 5 Coupling stage could also voltage isolate the coupling circuitry from the external world by means of a 1 1 PLC transformer Capacitor is laying out in SAM4CP16CMB The optional PLC transformer is included in ATPLCOUP007 board voltage isolated see chapter 4 Footprint of BNC connector J17 Figure A 5 is included in the board but is not mounted by default Removing the R12 and R13 and soldering R17 and R18 resistors the PLC coupling signal can be isolated from the mains grid and that connector allows performing measurements of transmitted and received PLC signal without side eff
60. ao XPLAINEDPRO EXTI Jumper J20 SAM4CP16CMB can also be soweree from USB connector J9 Figure A 8 or Xplained PRO interface J12 without requiring connection to mains Note that in these cases Vpop is not available so the PLC amplifier cannot be used The following test points and LEDs allow checking that these power supplies are running properly see Figure A 2 e Vpp TP6 and green LED D17 e 5V TP5 and green LED D3 e 3V3 TP13 and green LED D13 e GND TP3 amp TP4 Control of 3 3 volts power supply The SAM4CP16CMB provides activate or deactivate the 3 3 volts regulator by SHUTDOWN pin SHDN User can deactivate the 3 3 volts regulator before enter in a low mode power consumption of SAM4CP16C that can be powered by the battery This allows decrease the consumption of the board J21 lets us enable the 3 3 volts regulator always independently of SHDN pin By default this option is deactivated 3v3 is always on independently of the value of SHDN to activate this option remove the jumper in J21 Figure A 2 Figure 3 6 J21 enabling 3 3 volts jumper mpm i J19 A oF Aos XELA AINED PRO EXT1 Gal J24 P U13 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Ee By default jumper J21 is set 3 5 1 2 Zero crossing detector A simple isolated circuitry U9 Figure A 2 is used to detect mains zero crossing events This VNR signal is used direct
61. ates that the PHY Sniffer application is running on SAM4CP16C device e The LCD screen shows the following message G3 SNF 74 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 63 LCD message with PHY Sniffer binary programmed EEE E he t aa 6 4 5 Running the PLC application example 3 As you can see in Figure 6 55 the boards are plugged into the same power line Users have to execute an instance of the ATPL Multiprotocol Sniffer tool which has been previously installed in the host PC in order to enable communication between the sniffer board and the PC The ATPL Multiprotocol Sniffer tool is used to monitor data traffic on the network You can also use the ATPL Multiprotocol Sniffer tool to monitor the PLC messages which they do not belong the G3 standard then the messages will be showed in red colour and without PduType The main window of the Sniffer PC interface is shown in Figure 6 64 Figure 6 64 ATPL Multiprotocol Sniffer tool window en 3 File Configure Capture View About Silicon Labs Dual CP210x USB to UART Bridge Enhanced COM Port COM5 B115200 DB File ATPL log APPEND Once the application is launched the COM port for the board needs to be configured The COM port selection window is available by choosing Configure gt lnput Ctrl I A new window Input Settings will appear as shown in Figure 6
62. ation reassembly of the IPv6 packets Controlling broadcast multicast propagation Routing a message into the network Discovery and maintenance of the routes into the network e Pv6 UDP and DLMS Layers These layers are generic and not directly related to G3 PLC protocol These layers will run each one on a separate OS task if OS is used to make it possible to extract or insert any of them on the stack Also for this purpose each layer will provide the API defined in the corresponding standard e Serialization Layers Universal Serial Interface USI Serialization will be available on PHY layer Serialization of PHY layer will act as the PAL layer but communicating with a Serial Port Service instead of the MAC PHY Tester and PHY Sniffer projects use this serialization to communicate with the PC The following figure shows the architecture of the Atmel G3 software stack to be placed over the SAM4CP16C platform Figure 6 71 Atmel G3 software Stack overview ad Lu A A 2 u O r m PHY Serialization iL PLC For more information about the Atmel G3 Firmware Stack see the doc43081 and the G3 PLC specification Now we are to show the Atmel G3 PLC implementation using one of the provided examples Open the G3 workspace for SAM4CP16C platform SAM4CP16CMB_PLC_examples For that select your IDE tool and select the workspace according to your IDE in the Software folder Atmel SAM4CP16C EK Kit User
63. be explained For that please refer to the tool s embedded help Once received the values you can copy all values to check and analyze them clicking Copy Table button on the instances the reception and transmission Click the Restart button to start the test again It does first in the reception instance to avoid lose some frames For further information about the tool please refer to the tool s embedded help in the menu bar 6 3 PLC application example 2 PHY TX Test Console This example explains how to use the project application called apps phy tx test console This application lets the user to configure a proper setup to perform both EMC emissions and immunity tests for SAM4CP16CMB board These tests are based on the use of G3 PHY layer with a terminal console firmware apps phy tx test console bin that eases the configuration of several transmission parameters such modulation data to transmit tone map time interval between frames Following chapters explain to you how to supply the board select the UART1 to communicate with the SAM4CP16C load the firmware and run the application The setup is shown in the following figure Figure 6 46 Boards connection scheme 64 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 3 1 Supplying the boards Please refer to 6 2 2 in order to know how to supply the SAM4CP16CMB boards 6 3 2 USB con
64. bout building library projects see the IAR C C Development Guide for ARM First steps with Atmel Studio 6 2 Atmel Studio 6 2 does not support all the SAM4CP core family i e SAM4CP16C Due to this you have to install the provided patch in the kit PartPack_ATSAM4CP16C trunk 6 2 0 vsix For that execute the msi file and follow the installation wizard You can find it in the following directory Software Compiled_Patches AtmelStudio Once Atmel Studio 6 2 is installed in your computer launch Atmel Studio 6 2 Click the Start button on the Windows taskbar and choose All Programs gt Atmel gt Atmel Studio 6 2 The workspace file has the filename extension atsin If you double click a workspace filename the IDE starts Note Opening Atmel Studio 6 2 takes some time The following figure shows the main window and its default layout Atmel SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 37 Figure 6 8 Start page of Atmel Studio 6 2 ag tmelStuc U dit View VAssistX ASF Project Debug Tools Window Help e Aad Fagl aala U AA od wm 1 ad5 i I os gt SEE iMG EHDE FS 0 23 wa gt u gt s SSCS Se oe Hex l i daawa i la i w No Device NoTool Get Started Tools Help Latest News Ga New Example Project H Open Project 2 a Welcome to Atmel Studio Get to know Atmel Studio Recent Projects User Guide
65. branch design and galvanic voltage isolation ATPLCOUP0O06 has been designed to transmit in ARIB and FCC band especially in bands from 151 to 472 KHz channels 3 4 5 6 7 and 8 lt has a good performance in terms of transmitted channel power over a range of load impedance values complying with FCC standard as current carrier system see FCC normative ATPLCOUPO006 is com posed of two transmission branches which only differ on the filtering stage A 12V power supply voltage for the class D amplifier is recommended to be used with ATPLCOUPO06 For more information see PLC coupling reference designs document doc43052 Take into account that when ATPLCOUP0O06 is connected to SAM4CP16CMB Vopn voltage must be 12 volts to avoid damaging the coupling board so jumper in J20 must be set See section 3 5 1 and Figure A 2 By default the jumper is not placed Figure 5 3 Vpp selection in SAM4CP16CMB board Jumper ws FAN Ve Go s Maa i in rau O gt 4O91 THR 08 XPLAINED PRO EXT1 a VE 32 p ap i gt o uiui at a J20 lt a 4 gt 4 Je baa syi DA F DIS RY I T in E U13 C28 liei Faa ae Atmel SAM4CP16C EK Kit User Manual USER GUIDE 29 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 SAM4CP16C Evaluation Kit Getting started The purpose of this chapter is to introduce you the Atmel SMART SAM4CP16C device and its functionalities First of all chapter
66. button As soon as the button is clicked the button text will change to Connecting Then the application and the board start a process of identification and after few seconds the button text will change to Disconnect This means that the identification process has finished A new tab Product Information is appended to the wizard and Next button is enabled allowing the user to go to the following step of the configuration See Figure 6 32 Figure 6 32 Communication enabled Atmel PLC PHY Tester Tool v2 4 2 Welcome Product Information Summary Welcome to Atmel Multiplatform PhyTester this application allow you to test basic functionality of Atmel PLC products Please select the serial port in wich your Atmel board is connected to your PC Connection Serial Port BaudRate Altmel Enabling Unlimited Possibilities Click the Next button In case the tool cannot establish a communication with the board the tool shows the following error message 52 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 33 Communication error Lo Atmel PLC PHY Tester Tool v2 4 2 Description This tab shows information related with product identification model of the PCB and information about firmware version At the bottom of the tab it s necessary to select a choice between Transmision and Reception test Product Info Product Id Model Id taj A
67. ct gt Download and Debug or click the Download and Debug button amp on the toolbar to download your program to the board 5 The file main c is now open in the editor window and the program is stopped at the start Choose Debug gt Go or click the Go button on the toolbar to start the application Your IAR IDE window should now look like as Figure 6 7 6 Once the board is powered the green led D5 LEDO is blinking and the display DS1 shows the following message G3 PTT 36 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 1 7 Figure 6 7 The IAR Editor window I lt sam4cp16c_PLC_examples IAR Embedded Workbench IDE Lalle File Edit View Project Debug Disassem bly J Link Tools Window Help 2 cH E S s Blo CV RERS OP OH 1 WH Deb wD ES elr EEZ ZIX Files n Bo a z Elsam cp1 6c_PLC_examples A apps_dims_emu_coord_app_flas v common sam Ha G thirdparty 65 Atmel library includes Ha OG treertos 66 include asf h le g3 67 Ha G adp 6 amp Example configuration Ha G apps 69 include conf_project h AG dims_emu_coord_app 70 HAO sam4cpi6c_sam4cpi6cmb E aene eo Ha Oiar ve include dlms_emu_coord h ar in z Function declarations k E cont_busartith 76 void HardFault_Handler void
68. e Application Note doc43052 provides a description of the PLC Coupling Reference Designs available and all the features and characteristics 3 5 3 5 ATPLCOUP boards Table 3 1 summarizes the main characteristics of currently available PLC coupling reference designs Please refer to Atmel doc43052 for a complete description of ATPLCOUP boards Atmel SAM4CP16C EK Kit User Manual USER GUIDE 21 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Table 3 1 ATPLCOUP boards Frequency Branch Electrical G3 CENELEC Band Isolation Channel ATPLCOUP006 151 472 kHz es 3 4 5 6 7 8 1 Board Name ATPLCOUP007 35 89 kHz es SSS x Although different ATPLCOUPXXX can be used on the same SAM4CP16CMB board they may require different voltage for the class D amplifier Vpp As is commented in 3 5 1 VoD can be regulated to 16 or 12 volts depending on the J20 jumper position It is important to note that ATPLCOUP007 must be used with 12V The SAM4CP16C provides the ARIB FCC frequency band and it allows choosing up to 8 different channels This technology only allows one channel active at a time The limits of each channel are shown in the next table and can be compared with the table above Table 3 2 Frequency Band limits for each channel Channel Start freq kHz End freq kHz CENELEC ARIB se se ee E S E S E S eS E S E S E S ee a E S E S e a E S E S Ee S E S o wes oo y a f oa o o msee J o o x oax oo o
69. e a JTAG interface for debugging and programming purposes and two debugging UARTs And also it provides Battery Backup and slow crystal oscillator to support the embedded Real Time Clock RTC and low power modes Several wake up conditions are available such mains crossover detection and voltage rails recovery condition e Software application examples available based on G3 PLC Stack Atmel provides an Atmel G3 PLC PHY layer library with three example projects that lets you know how to use it And also the MAC and ADP layer to complete the Atmel G3 PLC Stack with two applications Atmel SAM4CP16C EK Kit User Manual USER GUIDE 3 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Table of Contents 1 Evaluation Kit Specifications cccccceseseesseseeceneesenseeceseeeenseseeseesensesenneeseneesoeseeseas 6 11 Safety recOMMeENdations ccccccccssseseecceeeeeeeeeeceeeeeeeaeeeeeeeeessaeeseeeeeeseeaeeeeceeeeesseeaeeeeeeeeesaaeeeeeeeeeesaaas 6 1 2 Electrical characteristics ccccccccccsececssececeececeeeceeeeeseeeeseueeseaeessaeeesaueeseueessaeessaeeesueessusessueesseeeeseeeesaes 6 2 Evaluation Kit OVErvieW c ccccssccssecssecesecesecesecesecesecesecenecesecesscenesenssenssesesenesensseness 8 EM DESIT UD Octet eae ce case sty scaescnceteec 9e ep wre E ess tncwte sn emcee capa eens wee ee eee 8 22 OAM4ACGPIGC EK COMGNIS eiiean ESE RA RE EE E TNA EAE ETE EREE 8 3 SAM4CP16CMB al
70. e of G3 PHY layer with a terminal console firmware that eases the configuration of several transmissions e Apps Phy_Sniffer_Tool This application configures G3 PHY layer to monitor the PLC data traffic on SAM4CP16CMB boards and sends via serial communication this traffic to the ATPL Multiprotocol Sniffer tool Every coupling board is intended to be used in their corresponding channel s only e APPS DLMS_EMU_COORD_APP and APPS DLMS_EMU_DEV_APP The DLMS Emulator applications are examples using the Atmel G3 PLC stack and show how the G3 API should be used These applications are provided for both Device and Coordinator Applications configure the SAM4CP16CMB board as Nodes with DLMS Emulation capabilities and simulate the data exchange between the G3 Coordinator and the Device s The Device responds dummy DLMS messages after receiving data requests from the Coordinator c Compiled patches for the SAM4CP16C in both IDE tools Atmel Studio and IAR d Common software documentation folder It contains some application notes as the description of the Atmel G3 firmware stack It describes in detail all layers from the Atmel G3 implementation as well as configuration options provided by Atmel e Evaluation License Agreement document 5 PCTools folder contents a Atmel PLC PHY Tester tool for checking the point to point PLC transmissions between SAM4CP16CMB boards Atmel SAM4CP16C EK Kit User Manual USER GUIDE 9 Atmel 43086C ATPL SAM4CP16
71. ects noise impedance coming from the grid 3 5 3 2 Reception stage The reception stage adapts the received analog signal to be properly captured by the internal reception chain Reception circuit is independent of the PLC channel which is being used It basically consists of 20 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 e Anti aliasing filter RC Filter R49 amp C43 Figure A 6 e Automatic Gain Control AGC circuit The AGC circuit avoids distortion on the received signal that may arise when the input signal is high enough to polarize the protective diodes in direct region D10 Figure A 6 e Driver of the internal ADC The driver to the internal ADC comprises a couple of resistors and a couple of capacitors This driver provides a DC component and adapts the received signal to be properly converted by the internal reception chain 3 5 3 3 Transmission stage The transmission stage adapts the EMIT signals and amplifies them if required Figure A 5 It can be composed by e Driver A group of resistors which adapt the EMIT signals to either control the Class D amplifier or to be filtered by the next stage e Amplifier If required a Class D amplifier which generates a square waveform from O to Vpp is included e Bias and protection A couple of resistors and a couple of Schottky barrier diodes provide a DC component and provide protection from receiv
72. ed Figure 5 2 ATPLCOUPO06v1 PLC coupling board Test point Test point Test point to measure the PLC signal TX led indication PLC transformer provides the voltage isolation from mains L Test point Mechanical and user considerations ATPLCOUPOO6 is delivered with the SAM4CP16C EK Board to board SMD connectors J1 and J2 are used to connect the ATPLCOUP006 into connectors J6 and J7 of SAM4CP16CMB board Figure A 4 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 5 4 5 4 1 These J1 and J2 connectors are in bottom layer of ATPLCOUPOO6 and they have the following part numbers e J1 SAMTEC FTR 130 54 L S e J2 SAMTEC FTR 124 54 L S The ATPLCOUP0O06 board is directly powered from mains grid so hazardous voltage is present on the board To avoid user access to dangerous parts ATPLCOUPOOQ06 must always be used in its enclosure ATPLCOUPO06 is a CE mark product that passes EN 50065 1 EN 50065 2 3 EN60065 7 EMC and FCC as current carrier system standards It also satisfies Pb Free and ROHS directive ATPLCOUPO06 dimensions are 51 5mm x 39 5mm x 18mm LxWxH The operating temperature range is about 40 to 85 C Hardware description Hardware files are contained in the Hardware folder WHardware HW SCH amp PCB ATPLCOUPOO06v 7 G3 PLC FCC channels Double Branch ATPLCOUPOO6v1 board is a PLC coupling driver board with double
73. ed disturbances Transmission stage shall be always followed by a filtering stage 3 5 3 4 Filtering stage The filtering stage is composed by band pass filters which have been designed to achieve high performance in field deployments complying at the same time with the proper normative and standards The in band flat response filtering stage does not distort the injected signal reduces spurious emission to the limits set by the corresponding regulation and blocks potential interferences from other transmission channels The filtering stage has three aims e Band pass filtering of high frequency components of the square waveform generated by the transmission stage e Adapt Input Output impedances for optimal reception transmissions This is controlled by TXRX signals e And in some cases Band pass filtering for received signals When the system is intended to be connected to a physical channel with high voltage or which is not electrically referenced to the same point then the filtering stage must be always followed by a coupling stage These components are not lying out on SAM4CP16CMB board because are dependent on the application parameters such frequency band transmission A set of boards known as ATPLCOUPXXX have been design by Atmel to implement any possible transmission scheme supported by SAM4CP16C SAM4CP16C EK includes ATPLCOUP007 and ATPLCOUPO06 which are described in chapter 4 and 5 Other coupling boards have been designed Th
74. ed in your computer The IAR s homepage htip www iar com is a Suitable source to download i e 30 day time limited evaluation license And the Atmel s homepage htip www atmel com is suitable for downloading the Atmel Studio 6 free download 6 1 1 IAR Embedded Workbench IAR Embedded Workbench is a high performance C C compiler assembler linker librarian text editor project manager and C SPY Debugger in an integrated development environment for applications based on 8 16 and 32 bit microcontrollers IAR Embedded Workbench is compatible with other ARM EABI compliant compilers and supports the SAM4C core family example projects are developed only for 7 10 1 versions or above 6 1 2 Atmel Studio Atmel Studio 6 is the integrated development platform IDP for developing and debugging Atmel ARM Cortex M and Atmel AVR microcontroller MCU based applications The Atmel Studio 6 IDP gives you a seamless and easy to use environment to write build and debug your applications written in C C or assembly code Atmel Studio 6 is free of charge and is integrated with the Atmel Software Framework ASF a large liorary of free source code with 1 600 ARM and AVR project examples ASF strengthens the IDP by providing in the same environment access to ready to use code that minimizes much of the low level design required for projects Use the IDP for our wide variety of AVR and ARM Cortex M processor based MCUs including our
75. edieeaece Rage 86 6 6 38 Programming the embedded fil S cccccccccseseceeeeeeeeeeeeeeeeceeeeseeeeeeeseeeeeeeesseeeeessaegeeeesesees 86 6 6 4 Running the PLC application example 4 cccccccssseecccceeeceeeeeeeeceeeseeaeeeeeeeeeesssaeaeeeeeeeeesaaeees 88 Tz TROTOUCINC CS oie aces E E A cases AE E E E E E 91 Appendix A Board schemes ccceescceseceeseeeeseeeneeeeseeenseoeseeeeseeeaseoesesenssoenesonsesensens 92 A 1 SAM4CP16CMBv1 schemes cccccceecececeeceaeeeesseeeeeeeeeeeeeeeeeeeeauaausaueeeeeeeeeeeeeeeeesaaaaaasadeeeeeseeeeeeees 92 A 2 ATPLCOUPOO7v2 SCNeMeS iszcczeccsteccautaccachcadcesdecnieeeseseetucdesddsaaenoadsbidectdebousaendeadasiacheraeddebedacdidGeteede Rada 99 PROVISION FRIST ONY otis waceiansicccc ntsc cc aes ccc eee aa aaaea aa aa eee ene 102 Atmel SAM4CP16C EK Kit User Manual USER GUIDE 5 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 1 Evaluation Kit Specifications 1 1 Safety recommendations These development boards must be only used by expert technicians SAM4CP16CMB is directly powered from mains grid so hazardous voltage 100 230Vac is present on the board To avoid user access to dangerous parts SAM4CP16CMB must always be used within its enclosure All required connectors and configuration jumpers are easily accessible without electrical shock risk IMPORTANT A normal use of SAM4CP16CMB does not require removing the enclosure cover If this actio
76. ee Atmel SAM4CP16C SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Atmel SMART Introduction SAM4CP16C EK is an evaluation kit of the G3 PLC for Power Line Communication from Atmel Corporation The Atmel SMART SAM4CP16C has a flexible architecture composed of hardware accelerators and coprocessors achieves a very efficient G3 PLC implementation SAM4CP16CMB is PLC multi purpose modem board based on the SAM4CP16C device This development board provides a full featured platform to develop a complete communications system over Power Line Communication technology SAM4CP16C is based on Atmel SMART SAM4C a high performance 32 bit dual core ARM Cortex M4 RISC processor embedding a G3 PLC modem The two cores Cortex M4 are able to operate ata maximum speed of 120 MHz featuring 1 Mbyte of embedded Flash 128 Kbytes of SRAM and on chip cache for each core The peripheral set includes advanced cryptographic engine anti tamper floating point unit FPU 5x USARTs 2x UARTs 2x TWls 6 x SPI as well as 1 PWM timer 2x three channel general purpose 16 bit timers integrated true RIC a 10 bit ADC and a 46 x 5 Segmented LCD controller This guide describes how to use the kit and get start with it Contents e Welcome letter that presents you the e Cables evaluation kit and the contents e Two micro A B type USB cables e Boards e Two power cord cables IE
77. eeeeeeessaaansess 33 6 1 6 First steps with IAR Embedded Workbench cccceceeeeeeeeeeeeeeeeeeeeeaeeeeeeesaaeeeeeeeaeneeeeesaaees 34 6 1 7 First steps with Atmel Studio 6 2 00nnnnnnnnnennnnnnnnnennnnnnennsnnnrnrrnnsrnnrnrrnnnrnnrrrrrnsennnrrreensnnnreenee 37 6 2 PLC application example 1 PHY Tester cccccccseccccecceeseeeeeeeeeeeeeeeeeeeeeesseeeeeeessaeeeeesseeaeeeeessaeeeeeees 42 6 2 1 Atmel PLC PHY Tester tool Installation ccc ceccccsseeceseeeeeeeeeeeeteneeteneeeeaeeeeeeeeteneeteneetaness 43 6 2 2 Supplying the boardS ssireiniiinnniernninnnnninnsinnersrnnaninnn ennnen nenna cascsGannchdtantnees aannaaien 46 2o UoBCOnNE 0 oa E E 47 6 2 4 Programming the embedded file cccccccccsseeececceesececceeeeeeecceeeceesseeueeeesssaeeeessaeeseessseeaes 48 6 2 5 Running the PLC application example 1 cccccceeeeecccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeaeeeeeeessssaaneess 50 4 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 3 PLC application example 2 PHY TX Test Console ccccccccceceeceeceeeeeesseeeeeeeeeeeeeeeseeseaaaaenseeeeeees 64 63 1 Supplying the boards eee nen ne ee ee ee ee ee eee ee eee 65 632 Os 816 11 16 1 eae ee cn ene oe ae eee eee eo eee ees oe oe eee KENE 65 6 3 38 Programming the embedded fil ccccccccccsseeeeeeceeeeeeeeeeeeeeeeeseeeeeeeeseee
78. eeeeesseaeeeessaaeseeeesaaees 65 6 3 4 Running the PLC application example 2 cccccccseesecccceeeeeeeeeeceeceeeeaeeeeeeeeeseseeaeeeeeeeessaaaeeees 65 6 4 PLC application example 3 PHY Sniffer ceccccceccseeeeeeeeeeeeeeeseeeeeeeeeeeeaaeeeeeeeeeeaeseeeeeesssaeageeeees 70 6 4 1 ATPL Multiprotocol Sniffer tool Installation 2 0 00 ceeceecceceeeeeeeeeeeeeeeeeeeaeeseeeeeeeeseaeseeeeeseeseaaees 71 6 4 2 Supplying the boardS asses asceerszces esis tencdecWececceendecu ditt ceanactensedeusbaccdeapdaendoumenescnehesuedeaeeeedicandeances 73 DAS WSR CONNECCION criar E E EE 73 6 4 4 Programming the embedded fil S cccccccccsseeeeeeeeeeeeeeeeeeeeceeeeeeeeeeeeseeeeeeeessaeeeeesaaeseeeesaaees 73 6 4 5 Running the PLC application example 38 cccccccsseeseeeeeeeeeeeeeeeeeeeeeeeaaeeeeeeeeeseaaaeeeeeeeeseaaaaees 75 65 TOUCH ONO a Saas cease cetdesencis E ia E r ae 78 Ca FREER eases E E E E A A EE 78 Co AOFM Oen E N e 78 6 5 3 Atmel G3 PLC Stack Structure ccccccceccccccceecceeeeseeceeeeeeeeeeseceeceeeeeeeseeeeeeeseaeaeeeeeeeessaaaeeess 79 6 6 PLC application example 4 PLC Network cc cceccccccccccceseseeceeeeeeseeeeeceeeeesseeeeseeeeeesssaaaeeeeeeeesseaaaeess 85 6 6 1 Supplying the DOAN S 5a aca enone cceecrenesecaatencacesonaneee saeiemedsnnenntencednanabeneccnseedaceccaenaseceaeeecasesoraseane 86 662 SB COMO COI eee cs ce cescseteccensetcchencceadecnadeoseeee eccesesccaceesd SodactsetesaeeeaceshaccechsedGecect
79. eeeessaaaeeees 27 5 ATPLCOUPOOQO6 Fran al Cscecicscicscac se ncscnc cence w se ncseae sere senwsenceeaesenweeawsvawseavseiceeswseaeaeasseee 28 Se VOR VOW sacacoencccrenaeeaccconcecersncacscecasatouiceeeecdcanctoan eves E E E E 28 Oe We SR race perce cs ccc piesa bates care es secu atisisarce cath onan uisaa cane ps decaaanoasuscnathoeensaueoacnaecnaeone A 28 5 3 Mechanical and user considerations cccccceeccccceeececeeceeceeeceeceeececeeeeeesauceeseeeeeeseaeeessueeeesaaeeesseeeeeas 28 5 4 Hardware description cet cera se eda dese eco ties seen eee ee acess oa as aceasta es eeim semen ecoueeoee 29 5 4 1 G3 PLC FCC channels Double Branch cccccceeseccecceeeeceeeeeeseceeecaeseceeeeeeeeceessaeeeeeeesnenes 29 6 SAM4CP16C Evaluation Kit Getting Started cccceeeeeeeeeeeeeneeeeeeeeeeneeeeneeeeeneenens 30 6 1 Introduction to the integrated development ENVIFONMENL ccccceecceceeececceeeceeceeeeesseeeeeseeeesseeeeeeas 30 6 1 1 IAR Embedded Workbench cccccccccseccccceeccecaeeceeceeeceeseeeeeceueeeeseaecessaueeeseueessaaecessaeeeesaaes 30 Ge Aa dO a A 30 6 13 Atmel SAMICE JTAG Probl wesicssinieasinsiscesnacsssantartetecasiecacuneinctesiuaisisiiovtesaestansatneuiasmeeuiatis 31 6 1 4 J Link SAM ICE JTAG Probe Software amp Documentation Pack cccccssseeeeeeeeeeeeeeeeaeees 31 6 1 5 Atmel Software Framework ASF cccccccseseecceceeceeeeeeeceeeeecaeeeseececeseeeeeseeeeeeesssaeae
80. end on your operating system As we commenied in a previous section every coupling board is intended to be used in gt their corresponding frequency band s only By default sniffer project of G3_va b c_CENELEC folder is compiled for ATPLCOUP007 board This means that only CENELEC A frequency band is supported If you are going to use ATPLCOUPO06v1 coupling board you must use G3_va b c_FCC folder to build the PHY sniffer project with the correct configuration For that open the IDE tool used Atmel Studio or IAR Embedded Workbench And open the PHY sniffer project application apos_phy_sniffer_tool ats n or aopos_phy_sniffer_tool eww After that you can select the file conf projeci h that it is in the PHY project directory Software G3_va b c_FCC g3 workspace sam4cp16c_sam4cp16cmb thirdparty g3 phy atol250 apps phy_sniffer_tool sam4cp16c_sam4cp16cmb find the define function to select the coupling board configuration see Figure 6 27 and check the frequency band name is the desired So build to generate the output file Figure 6 62 FCC Frequency band configuration definition 47 Define work band 43 define CONF BAND CENELEC A define CONF_BAND_FCC 5 define CONF_BAND ARIB 49 Check the Table 3 1 for the characteristics of the available ATPLCOUPxxx boards In order to know if the boards were programmed successfully you can check the following e The green led D5 LEDO is blinking This indic
81. er Manual USER GUIDE 43 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 17 Installation process slide 2 5 Atmel PLC PHY Tester T Welcome to the Atmel PLC PHY Tester Tool Setup Wizard This wizard will guide you through the installation of Atmel PLO PHY Tester Tool It is recommended that you dose all other applications before starting Setup This will make it possible to update relevant system files without having to reboot your computer Click Next to continue Click Next to continue Figure 6 18 Installation process slide 3 5 Atmel PLC PHY Tester Tool Setup License Agreement Please review the license terms before installing Atmel PLC PHY Tester Tool Press Page Down to see the rest of the agreement your employer Licensee and Atmel Corporation Atmel By dicking the I Accept button or by downloading installing or using any of the software available for download Licensed Software you are indicating that you are binding Licensee to the terms of this Agreement and that you are duly authorized by Licensee to do so If you are not authorized to bind Licensee to the terms of this Agreement or if Licensee does not agree to be bound by all of the terms of this Agreement do not dick the I Accept If you accept the terms of the agreement dick I Agree to continue You must accept the agreement to install Atmel PLC PHY Tester Tool Nullsoft Install System
82. fault parameters are selected Click the Next button to continue The next tab shows a table where all the configuration parameters and their selected values are listed lt is recommended to check that all values correspond to the desired configuration before continue 60 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 43 Configuration Summary tab a Atmel PLC PHY Tester Tool v2 4 2 Transmission Parameters Tx TestParameters Configuration Summary Description This tab shows a brief of the configuration fixed in previous steps at the tab there is a little explanation of how to proceed with the test Configuration Summary Parameter Serial Port COM6 Enhanced Test Type TX Frame Interval ms 100 Number of Frames 100 Modulation Scheme Differential Attention In order to obtain correct result for the test please start before Rx board than Tx board Atmel Enabling Unlimited Possibilities To start the process click the Start Test button A new tab Test Executions reports of TX process will appear with the frame sent and the TX result of the transmission process Now you can observe the transmission and reception process in both Test Executions windows If messages are different the receiver will not recognize them as a valid If the configured interval and number of frames are different the statistics computed at the end of the
83. fig examples and inc with the same folders where the IAR has been installed in your computer Typical directory for windows 64bits should be c Program Files x86 IAR Systems Embedded Workbench X X X arm Once have installed the IAR Embedded Workbench Open IAR Embedded Workbench Click the Start button on the Windows taskbar and choose All Programs gt lAR Systems gt IAR Embedded Workbench for ARMs AR Embedded Workbench The file aridePm exe is located in the common bin directory under your IAR Systems installation in case you want to start the program from the command line or from within Windows Explorer The workspace file has the filename extension eww If you double click a workspace filename the IDE starts If you have several versions of IAR Embedded Workbench installed the workspace file is opened by the most recently used version of your IAR Embedded Workbench that uses that file type regardless of which version the project file was created in The following figure shows the main window and its default layout 34 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 a 6 5 The IAR Embedded Workbench window sam4cpi6c_PLC_examples IAR Embedded Workbench IDE o amp ss M n r Edit View Project Tools Window Help l enu ba uces RUPP oP amp s UUR S 2 L Toolbar wm ranc os Gm section Description Files
84. folder is the Physical Abstraction layer In the Atmel G3 PLC stack structure there are some important configuration files where the user can select some options that modify the behavior of the project Note that these configuration files contain the proper configuration for the provided boards of the kit and user does not need to change them e PHY configuration files see Figure 6 73 In the g3 folder Software g3_va b c_CENELEC g3 workspace sam4cp16c_sam4cp16cmb thirdparty g3 phy at pl250 module_config there are two files ato 250db_conf c and atol250db_conf h Note that these files allow to the user to configure PHY layer initial parameters Thus user can adapt the PHY layer to any hardware designed e Project configuration files see Figure 6 73 There are several files conf board h to configure the SAM4CP16CMB board features watchdog drivers peripherals conf _buart_if h to configure the number and buffers size of the UARTs conf _busart_if h to configure the number and buffers size of the USARTs conf clock h to configure the SAM4CP16C clock conf_oss hto configure the system as microcontroller mode or FreeRTOS OS conf platform h to configure the timers parameters and power down detection conf pplc_if h to configure PPLC interruption According with the hardware used it is necessary to define de SPI configuration selected for the communication with the G3 modem the interruption and rese
85. h are independent of the other configurations For example a configuration that is used for debugging would not be highly optimized and would produce output that suits the debugging Conversely a configuration for building the final application would be highly optimized You can build your project either as an application project or a library project You have access to the build commands both from the Project menu and from the context menu that appears if you right click an item in the Workspace window To build your project as an application project choose one of the three build commands Make F7 Compile Ctrl F7 and Rebuild All They will run in the background SO you Can continue editing or working with the IDE while your project is being built Error messages are displayed in the Build window lf your source code contains errors you can jump directly to the correct position in the appropriate source file by double clicking the error message in the error listing in the Build window or selecting the error and pressing Enter After you have resolved any problems reported during the build process you can directly start debugging the resulting code at the source level Process to build compile load and debug the project over the board could be DOB 1 Choose Project gt Make or click the Make button _ on the toolbar The part should compile with no errors 2 Connect the SAM ICE JTAG probe 3 Supply on the board 4 Choose Proje
86. ich Cortex M3 M4 microcontroller applications can be built to meet their hard real time requirements It allows Cortex M3 M4 microcontroller applications to be organized as a collection of independent tasks to be executed The kernel decides which task should be executed by examining the priority assigned to each by the application designer In the simplest case the application designer could assign higher priorities to tasks that implement hard real time requirements and lower priorities to tasks that implement soft real time requirements This would ensure that hard real time tasks are always executed ahead of soft real time one Thanks to the FreeRTOS scheduler we are able to optimize G3 PLC code and memory usage Although the SAM4CP16C has two cores we will run the G3 project only in the core 0 6 5 2 ASF Integration As it was explained before ASF has a defined structure ASF root folder contains the common directory the sam directory and the thirdparty directory The components contents of thirdparty directory are showed in the following figure That is the way to integrate the whole platform in this structure SAM4CP16CMB SAM4C PLC G3 and FreeRTOS 78 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 69 SAM4C amp G3 Integration in thirdparty folder G3 Library layer stack F FreehTOS components lanos Hardware components Software Stack
87. ies In Reception Parameters tab you can select the tonal noise adaptation and the tone mask feature e Tonal noise adaptation The phy layer is able to detect tonal noise and configure some input filters in order to cancel this noise User can select two modes Manual and Automatic Automatic Configuration Hardware is performing noise captures every fixed interval configurable After each capture the hardware selects the proper filtering for the noise detected User can configure to only perform the noise captures when hardware is not receiving This option is activated by means of Delay noise capture after correct reception checkbox Manual Configuration In this mode the hardware only performs noise analysis when user press Search and Adapt to Noise button The user is also able to indicate the frequency where tonal noise is present and the firmware will configure the filters for this noise by means of Adapt to target frequency button Finally user can disable noise adaptation using Disable Noise Filtering button e Tone mask It allows to disable carriers for each symbol as G3 specification says An array of 0 and 1 is shown when selecting Custom mode there was a digit for each carrier in the current band plan CENELEC A 36 FCC 72 ARIB 54 1 means carrier disabled and 0 means carrier not disabled Default option configures the PHY layer to disable the carriers specified in G3 interoperability tests for each band pla
88. ing Unlimited Possibilities 56 SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Atmel The previous figure Configuration Summary tab shows a table where all the configuration parameters and their selected values are listed It is recommended to check that all values correspond to the desired configuration before to continue To start the process click the Start Test button A new tab is enabled at first the table is empty because any frame has been received Note that there is a timeout to wait the frame reception Figure 6 38 Test Execution tab ia Atmel PLC PHY Tester Tool v2 4 2 Product Information Reception Parameters Rx TestParameters ConfigurationSummary TestExecution Atmel Enabling Unlimited Possibilities Then eee Once the receiver board has been configured the emitter board must be configured Launch another Atmel PLC PHY Tester tool and once the transmission board is supplied and USB cable connected configure the corresponding COM port for the board in the Starting Window Once COM port is selected click the Connect button As soon as the button is clicked the button text will change to Connecting Then the application and the board start a process of identification and after few seconds the button text will change to Disconnect This means that the identification process has finished Figure 6 39 Press Next button At
89. ink compatible with RDI compliant debuggers Installing the software will automatically install the J Link USB drivers It also allows the update of applications that use the J Link DLL The last version of the driver for the SAM ICE JTAG Probe can be downloaded from the http www segger com website using the following link http www segger com jlink software html The package for Windows Setup _JLinkARM_V496b zip is located in the following folder PC Too ls SAM ICE Driver SEGGER adds flash programming support for Atmel ATSAM4CP16C in version 4 90 July 2014 or above Once drivers have been installed you may verify the driver installation by consulting the Windows device manager If the driver is installed and your SAM ICE is connected to your computer the device manager should list the J Link driver as a node below Universal Serial Bus controllers as shown in the following screenshot Figure 6 3 Device manager B Device Manager je am Fear Will Batteries H m Computer H E Disk drives H Display adapters 5 DYD CD ROM drives Floppy disk controllers HE Floppy disk drives HE IDE ATAZATAPI controllers 3 Keyboards H ie Mice and other pointing devices HEN Network adapters fe Ports COM amp LPT E cf Sound video and game controllers 2 System devices E Universal Serial Bus controllers i Link drive USB Root i j 2a 8237148 EB PCI to USB Universal Host Controller Hub
90. is granted hereunder ATMEL SHALL NOT BE LIABLE FOR ANY INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES RELATING TO USE OF THIS EVALUATION BOARD SKIT ATMEL CORPORATION 1600 Technology Drive San Jose CA 95110 USA Atmel SAM4CP16C EK Kit User Manual USER GUIDE 101 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Revision History Dooi s A Date Comments 43086C 09 2015 Updating EK contents G3 PLC software version and boards 43086B 03 2015 Updating software projects 43086A 02 2015 Initial document release 102 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 an CONNECTED Altmel Enabling Unlimited Possibilities fiviinis o Atmel Corporation 1600 Technology Drive San Jose CA 95110 USA T 1 408 441 0311 F 1 408 436 4200 www atmel com 2015 Atmel Corporation Rev Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Atmel Atmel logo and combinations thereof Enabling Unlimited Possibilities and others are registered trademarks or trademarks of Atmel Corporation in U S and other countries ARM ARM Connected logo and others are the registered trademarks or trademarks of ARM Ltd Other terms and product names may be trademarks of others DISCLAIMER The information in this document is provided in connection with Atmel products No license express or implied by estoppel
91. l ATPL Multiprotocol Position your mouse over a component to see its description Space required 51 4MB Nullsoft Install System v2 46 Click Next to install the component selected 72 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 60 Installation process slide 5 gt Atmel ATPL N tocol Sniffer Setup Choose the folder in which to install Atmel ATPL Multiprotocol Sniffer Setup will install Atmel ATPL Multiprotocol Sniffer in the following folder To install in a different folder cick Browse and select another folder Click Install to start the installation Destination Folder ogram Files x86 Atmel ATPL Multiprotocol Sniffer_ 1 147 Space required 51 46 Space available 302 6GB Nullsoft Install System v2 46 Setup will install the program in the Destination Folder To install in a different folder click Browse and select your destination folder Click Install to start the installation process Figure 6 61 Installation process slide 6 Lp Atmel ATPL Multiprotocol Sniffer Setup e Completing the Atmel ATPL Multiprotocol Sniffer Setup Wizard Atmel ATPL Multiprotocol Sniffer has been installed on your computer Click Finish to dose this wizard Cancel Click Finish Now the program is installed in your computer and a shortcut should have been created in your desktop 6 4 2 Supplying the boards Please refer to 6 2 2
92. l and provides an interface compliant with the G3 PHY and MAC layers and is in charge of communicating both layers properly It will implement primitives to inform the MAC layer of events coming from PLC Apart from these tasks PAL will directly address function calls from MAC to transmit a frame to PHY layer The same will occur with MAC calls to PLME functions which will be directly addressed to PHY functions related to PIB access e MAC and Adaptation Layers These layers will run together in 1 OS task if OS is used along with the PHY layer MAC layer will access PHY layer using an intermediate PAL described above It will implement the API defined in G3 PLC specification for the upper layer Adaptation Layer MAC implements the following tasks Channel access with CSMA CA High and normal priority Segmentation of big packets Segment acknowledgement and retransmission of lost segments Network scan Transmission robustness management e Adaptation layer will access MAC layer below and will implement the API defined in G3 PLC specification for the upper layer IPv6 Layer so any implementation of IPv6 can be used above it ADP implements the following tasks Handles the device authentication and encryption key distribution IPv6 headers compression decompression 80 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Fragment
93. lus applications apart from some auxiliary folders Two different apps folders can be found one under phy atpl250 where PHY example applications are located and one directly under the g3 folder where example applications involving the whole stack can be found apart from the generic workspaces which contain all the previously mentioned projects Any of these apps folders contain the projects for the supported compiles so user can open inspect and compile them 82 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 72 G3 PLC library structure _ Basic G3 PLC Project SAM4CP16C Laud common fs sam ip boar sam4cp16cmb Hardware SAMA4CP Family definition Laut syscalls gt G3 Stack _ atpl250 Note This figure is only to give a general idea about the distribution of the folders and the libraries in a basic G3 PLC project Atmel SAM4CP16C EK Kit User Manual USER GUIDE 83 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Where G3 folder contains e adp folder contains the Adaptation layer API e bootstrap folder contains the bootstrap process e Ipv6 folder contains the IPv6 stack e libs folder contains the MAC and ADP library e mac folder contains the MAC layer API e oss folder is the Operative System Support e phy folder is the Physical layer e __ pal
94. ly U_PLC Coupling Tx Power Supply SchDoe PLC Coupling Tx SchDoc OY E U_PLC Coupling Rx U_SAMACP 16x PLC Coupling Rx SchDoc SAM4ACP I 6x SchDoe SAM4CP16x PINOUT sae JTAG B U_Interface B Interface SchDoc BN MIMO Interface U_SAM4CP 16x Power SAM4CP 16x Power SchDoc c D UARTS c SS SS JUMPERS CONFIGURATION vi Initial Release mnoo ar _ Date Ld Bate Aunor 2 R 20Vacposition 115 230Vac selection p 2 m9 Cos Chbsetoemabe3y3 AR SAMACP1GxMB vI At D C2 no Opa Vdd16 i2V selection N N mst me a ar Cose Mirem Verified JL C File Main SchDoc 3 m Open Case flash memory l TER C4 ns Cbse GV3 Selectionof VDDBU 3V3 or VBATI a e AD PCB TITLE aa pa 1 2 3 4 Figure A 2 SAM4CP16CMB Power supply scheme l 2 3 4 A A 00nF 50V BAT54 R76 5KI TP6 VDC FB7 Q I7 10_CSS 100nF 3 FB2 VDI Sas VSW s VDD 1A max DH C24 e R106 m2 s sMpjaga amp 7uF SOV fiOOnF SOV 140K Y vn TP4 cie A DNP TP3 DNP NZ i c92 i ad DIT GND 330pF MP1562 3 NA GREEN c89 R44 GND lt 7 DNP Ras 7 90 9K GND 243K 7 7 16V gt J20 OFF R7 12V gt J20 ON 10K 1 GND GND V 7 GND sv Si1553CDL c c fi per GND Initial Release Description Date Author x Cen a Sheet 2 of 8 amp 8 APF me a _ aaa a So Damaja re Power Supp Soe Code number TITLE X kd Power Supply in l 2 Atmel SAM4CP16C E
95. ly in the PPLC transceiver VZ Cross as well as in SAM4CP16C core through an input PB11 port as another wake up condition 3 5 2 SAM4CP16C Flash Microcontroller 3 5 2 1 SAM4CP16C Overview The Atmel SMART SAM4CP16C U1 Figure A 3 is a member of a family of Flash microcontrollers based on a dual high performance 32 bit ARM Cortex M4 RISC processor embedding a G3 PLC transceiver These devices operate at a maximum speed of 120 MHz and feature up to 1 Mbyte of embedded Flash 128 Kbytes of SRAM and on chip cache for each core The SAM4CP series is a scalable platform providing alongside Atmel s industry leading SAM4 standard microcontrollers unprecedented cost structure performance and flexibility to smart meter designers worldwide The peripheral set includes advanced cryptographic engine anti tamper floating point unit FPU 5x USARTs 2x UARTs 2x TWls 6 x SPI as well as 1 PWM timer 2x three channel general purpose 16 bit timers an RTC a 10 bit ADC and a 46 x 5 Segmented LCD controller It operates from 3V to 3 6V and is available in 176 pin LQFP package The ERASE pin can be used to reinitialize the Flash content so setting a jumper in J14 connector Figure A 3 the flash content is erased This pin integrates a pull down resistor of about 100KQ so that it can be left unconnected for normal operations When the ERASE pin is tied high during less than 100ms it is not taken into account The pin must be tied high during mo
96. m NUM it bar Let s have a closer look to the environment now Basically the environment is split into five different areas e Editor window allows you to edit the source files e Workspace window shows the project structure e Message window displays messages from the compiler e The Menu bar lets us the menu commands e The IDE toolbar available from the View menu provides buttons for the most useful commands on the IDE menus and a text box for typing a string to do a quick search e The Status bar at the bottom of the IAR Embedded Workbench IDE main window available from the View menu contains useful help about how to arrange windows that they can be enabled from the View menu Open the G3 PLC workspace for SAM4CP16C platform sam4cp16c_PLC_examples eww For that on the start page click on File gt Open gt Project Solution And select the project in the folder Software G3_va b c_CENELEC g3 workspace sam4cp16c_sam4cp16cmb thirdparty g3 apps apps _ workspace_sam4cp16c_sam4cp16cmb iarew_workspace sam4cp16c_PLC_examples eww Once you have loaded the workspace you can see the three G3 PLC PHY example projects and both G3 PLC DLMS applications Open the APPS _ DLMS EMU COORD project And now you can see the G3 PHY project structure expand the tree structure in the workspace window That structure is showed in the previous figure 6 1 6 1 Building programming and debugging a project with IAR Now you c
97. mel SAM4CP16C EK Kit User Manual USER GUIDE 57 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 39 Communication enabled La Atmel PLC PHY Tester Tool v2 4 2 Welcome Product Information Summary Welcome to Atmel Multiplatform PhyTester this application allow you to test basic functionality of Atmel PLC products Please select the serial port in wich your Atmel board is connected to your PC Connection Serial Port 166164 BaudRate Bieset _ Altmel Enabling Unlimited Possibilities A new Tab Product Information is appended to the wizard and Next button This time we select in Product Information tab the Transmission option test Figure 6 40 Figure 6 40 Transmission option selection L Atmel PLC PHY Tester Tool v2 4 2 lo B X Product Information Transmission Parameters Tx TestParameters Configuration Summary Description This tab shows information related with product identification model of the PCB and information about firmware version At the bottom of the tab it s necessary to select a choice between Transmision and Reception test Product Info Product Id SAM4CP 16C G3 CENELEC A Model Id 0x0001 Firmware Id 0x25010201 Transmission Reception Verify Coupling a Warning The coupling board plugged in the main board must be the proper one A Check the coupling identifier that you can find in the coupling board If current coupling is
98. micro USB cables in order to connect the user s host s PC s with the two boards Figure 6 24 UART amp JTAG connectors bens f F i I l Lt v 7 4 _ asy DESET 4 Za RES APLAINED KH ti gt r gt a Pa Fg jet aan a fo j lt _ UARTs Connectors 1 TARELY aa rire SAM4CPIGBNE val Ween SANSCPI6CIB vi lt 4 J TAG Connector Connect the USB cable to the micro B USB connector and the host PC If the PC does not recognize the USB download the USB driver from the manufacturer webpage or take it from the PCTools folder PCTools USB_ Drivers Once the driver is downloaded unpack the driver archive to a folder on the host PC s hard disk Connect the USB cable to the board The new hardware installation will recognize the new board and will guide you through the USB driver installation When the wizard asks for the driver to install navigate to the directory where the driver archive has been unpacked to Identify the new hardware in the Windows Device Manager The assigned COM port number is needed when configuring the PHY Tester tool application later See the following figure for an example of a COM port assignment Atmel SAM4CP16C EK Kit User Manual USER GUIDE 47 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 25 Device manager y Device Manager File Action View Help e 9 mE Gla P R I 4 ZARDT0024 gt gt Batteries gt 7 Computer
99. modulation technique OFDM can efficiently utilize limited bandwidth channels allowing the use of advanced channel coding techniques This combination facilitates a very robust communication over a power line channel in presence of narrowband interference impulsive noise and frequency selective attenuation OFDM supports differential modulations DBPSK DQPSK D8PSK and DBPSK in robust mode and coherent modulations BPSK QPSK 8PSK and BPSK in robust mode to use in CENELEC FCC and ARIB bandplans 10 kHz 490 kHz In G3 PLC convolutional Reed Solomon and CRC16 coding provide redundancy bits allowing the receiver to recover lost bits caused by background and impulsive noise And also other techniques as adaptive tone mapping notching and modulation provide very robust power line communications On top of the PHY layer the G3 PLC MAC and ADP layers provide the conditions for fast and secure communication by use of advanced routing techniques through hopping via devices in the network The ITU T G 9903 data link layer specification comprises these two layers e The MAC layer based on IEEE 802 15 4 e The adaptation layer based on IETF RFC 4944 In the following sections there are basic overviews of the Atmel libraries used and the description of the whole system integration FreeRTOS G3 PLC stack and the SAM4CP16C in a G3 project using the ASF structure 6 5 1 FreeRTOS FreeRTOS is a real time kernel or real time scheduler on top of wh
100. n If you do not use the tone mask feature select None Click the Next button to continue The next tab shows the RX Test Parameters see Figure 6 36 This tab is where the following reception test parameters are configured e Time Interval milliseconds expected interval between frame transmissions e Number of Frames number of frames to be received e Message ASCII message expected Atmel SAM4CP16C EK Kit User Manual USER GUIDE 55 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Default parameters 100 ms and 100 frames are selected test parameters Tester Tool v2 4 2 This tab allow to configure all necessary parameters related with a reception test Parameters are Time Interval expected interval between frame transmmition Number of Frames number of frames to be received Message ascii message expected Test Parameters Time Interval ms 100 Number of Frames 100 Atmel Enabling Unlimited Possibilities Click the Next button to continue Figure 6 37 Configuration Summary tab This tab shows a brief of the configuration fixed in previous steps at the tab there is a little explanation of how to proceed with the test Configuration Summary Parameter Serial Port COM5 Enhanced Test Type RX Frame Interval ms 100 Number of Frames 100 Attention In order to obtain correct result for the test please start before Rx board than Tx board Atmel Enabl
101. n is necessary it must be performed by qualified staff after being sure that mains connection has been previously removed Be careful because it is only for indoor use This development board does not have any switch on mains connection to switch on or off it It must always be connected to an easy accessible mains socket Do not connect any probe to high voltage sections if the board is not isolated from the mains supply to avoid damaging of measurement instruments This board can be used with coin lithium batteries which are highly contaminated products Used batteries must always be recycled ViN WARNING The boards kits are shipped in a protective anti static package The board system must not be subjected to high electrostatic discharge We strongly recommend using a grounding strap or similar ESD protective device when handling the board in hostile ESD environments offices with synthetic carpet for example without enclosure Avoid touching the component pins or any other metallic element on the board SAM4CP16CMB is a CE mark product which passes EN60950 1 safety standard and EN50065 1 EN50065 2 3 EN600065 7 EMC standards It also satisfies Pb Free and ROHS directive WARNING ATMEL does not assume responsibility for the consequences arising from any improper use of this board Boards kits are intended for further engineering development demonstration or evaluation purposes only It is not a finished product exce
102. nection Please refer to 6 2 3 in order to know how to connect the micro USB cable with the SAM4CP16CMB board Remember to select the Standard COM Port UART1 As is commented in section 3 5 5 3 UART 1 is available by USB connector J9 UART1 CMOS signals are also available in a triple row male connector J16 see Figure 6 24 6 3 3 Programming the embedded file We have commented in section 6 2 4 the way to program a board Open the IDE tool used Atmel Studio or IAR Embedded Workbench Select the project apps _phy_tx_test_console aisin or apps_phy_tx_test_console eww and build it to generate the output file Now you can download the file to the board Note that kits do not provide a J Link ARM or SAM ICE JTAG probe in order to connect to the user s host PC and the boards to download and debug the projects Remember that the J Link USB drivers must have been downloaded previously from the Segger webpage see section 6 1 4 and they depend on your operating system Remember that every PHY example project is contained in the following Software folder Software G3_va b c_CENELEC 93 workspace sam4cp16c_sam4cp16cmb thirdparty g3 phy atpl250 apps And also you can find all of them in the workspace project sam4co16c_PLC_examples which is contained in following Software folder Software G3_va b c_CENELEC g3 workspace sam4cp16c_sam4cp16cmb thirdparty g3 apps apps_workspace_sam4cp16c_sam4cp16cmb 6 3 4 Running the PLC applicati
103. not the proper one for binary flashed please remove it and connect the proper one Also verify that Vdd is the correct for the coupling board selected Otherwise the board could be seriously damaged Atmel Enabling Unlimited Possibilities Note the displayed warning message before to select the coupling board and the voltage value Vpb 58 SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Atmel Once the transmission option is selected click the Next button The Transmission Parameters tab appears Figure 6 41 that allows you to configure the PLC coupling board plugged and the transmission parameters Figure 6 41 Transmission Parameters tab lugs Atmel PLC PHY Tester Tool v2 4 2 K Help Welcome Product Information Transmission Parameters Tx TestParameters Configuration Summary Description This tab allow to configure all necessary parameters in order to make a transmission Transmission Parameters Modulation Scheme i j Tx Power Modulation Scheme SubBand Idx SubBand Power Tone Map Preemphasis 0 a Branch Configuration Tone Mask None Default Custom Lower frequency Higher Frequency Atmel Enabling Unlimited Possibilities The Transmission Parameters tab appears Figure 6 41 that allows you to configure the PLC coupling board plugged and the transmission parameters The transmission paramete
104. ode all the messages sent in the Interoperability tests defined by the G3 PLC Alliance Figure 6 66 Database Settings window Select File ATPL4og sal Append Overwrite DateTime Suffix At this point the tool is ready to start capturing data If board is not powered this is the point to supply it Click on the menu Capiure gt Start to begin logging data If tool establishes the communication with the COM port of the SAM4CP16CMB the status bar at the bottom of the window will show the current setup and status of the tool On a G3 network the main window will look like as the Figure 6 67 Main window displays a table with the current log It is updated in real time as frames are received from the hardware sniffer 76 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 67 ATPL Multiprotocol Sniffer tool main window ATPL Multiprotocol Sniffer Log C 00 TRABAJO DATA G3 DISCOVERY_BOOTSTRAP rebuild sql CoCa eta View Export Hexa View X Packet View Gx 00 01 02 03 04 05 06 OF 08 09 OA OB OC OD OE OF Field Value 1 09 00 OC 61 C8 CA 1D 78 00 00 88 77 66 55 44 33 a x wfUD3 Frame 3 ModType 4 2 22 11 40 02 10 00 11 22 33 44 55 66 77 88 00 00 8 3DUfw ModScheme 0 ree a Delimiter Type 1 3 FS 89 m Symbols 0 Timestamp 2014 09 24713 51 4 LOI 0 Duratio 68 11 Delta 3040 08
105. older is intended for ATPLCOUP007v2 board CENELEC A band in case you are going to use ATPLCOUPO06v1 coupling board FCC bands you must use G3_va b c_FCC folder to build the DLMS EMU projects with the correct configuration In case you want to use the boards kits only this first step has to be taken into account previous to download the firmware Next steps can be omitted and load the project default options in the boards Step 2 Configuring RTOS option As we commented previously in section 6 5 3 the user can choose between two different operation modes e Microcontroller operation mode e RTOS operation mode using FreeRTOS The operation mode is defined in conf_oss h file under the following define sentence OS Support 7 define OSS USE _FREERTOS When OSS _USE_FREERTOS is defined then the FW is configured to work in RTOS gt operation mode FreeRTOS by default Otherwise when OSS USE FREERTOS is not defined then the FW is executed in microcontroller operation mode If the user needs to change the RTOS configuration of his task time period priority he can modify the corresponding variables in the header file oss_if h i Please take into account the requirements handling and usage of the Atmel G3 PLC FW Stack prior to changing the RTOS configuration Step 3 Initializing FW stack In order to start using the Atmel G3 PLC firmware stack it is necessary to use the following function in the main function
106. on Parameters and Tx Test Parameters tabs are added Finally independently of the kind of selected test two more tabs are added Configuration Summary and Test Execution This tab remembers you to set the right PLC coupling boards in both SAM4CP16CMB boards and the proper voltage to use them Vpp selection First we will describe the process to configure a board as receptor and after that we will describe how to configure the other board as emitter Selecting the Reception option and clicking the Next button a tab appears as the following image Figure 6 35 54 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 35 Reception Parameters tab La Atmel PLC PHY Tester Tool v2 4 2 it Help Welcome Product Information Reception Parameters Rx Test Parameters Configuration Summary Description This tab allow to configure the channel in which board is going to receive the messages This is the only configuration needed by the PHY layer in order to receive messages Tonal Noise Adaptation Automatic Configuration Manual Configuration Interval ms 60000 Search and Adapt to Noise Disable Noise Filtering 7 Delay Noise capture after correct reception Adapt to Target Frequency Target Frequency Hz ToneMask None Default Custom Lower frequency Higher Frequency Atmel Enabling Unlimited Possibilit
107. on example 2 As the PLC application example 1 boards are plugged to the mains see Figure 6 46 Users have to execute an instance of the serial interface tool which has been previously installed to the host PC in order to enable communication between both boards Please note that these two instances may or may not run on the same computer Atmel SAM4CP16C EK Kit User Manual USER GUIDE 65 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 66 Figure 6 47 PHY TX Test Console concept Power Line For this example a serial interface tool is required HyperTerminal is not installed on Windows 7 You can use a PuTTY terminal instead Once you have the serial terminal in your computer open putty exe and connect to the COM port number assigned to the micro B USB cable see Figure 6 24 As is commented in section 3 5 5 3 UART 1 is available by USB connector J9 UART1 CMOS signals are also available in a triple row male connector J16 see Figure 6 24 Remember to select the Standard COM Port UART1 Figure 6 48 COM Port selection SEES R n corroc ees Basic options for your PuTTY session Specify the destination you want to connect to i Serial line _ Speed Las COM 115200 Connection type Raw Telnet Rlogin SSH File Action View Help e 9 mH Em e e NE 4 gy ZARDT0024 bbe gt 4 Batteries D JE Computer gt Disk drives gt MY Display adapters
108. op aTsate l adp T Wami x eA Enable fast math ffast math Spp PEM None 00 2 Other optimization flags IREEN 4 thirdparty Optimize more O2 CMSIS i EF Miscellaneous 4 dims_emu_coord_app 4 E ARM GNU Linker Generate position independent code fpic 4 sam4cpl6c_sam4cpl6cmb General Libraries Allow called functions be located anywhere in the 32 bit address space mlong calls a conf_platform h W conf_project h Optimization E Memory Settings i bootstrap amp Miscellaneous common 4 E ARM GNU Assembler gt ipv6 General gt ay libs n E Debugging gt Ga mac 4 E ARM GNU Preprocessing Assembli fim oss General iS oa Symbols ph Debugging phy 4 eo Archiver z5 E General t addons b include 4 module_config H atpl250db_conf c W atpl250db_conf h p source p platform ag license bt Find Results 1 ESETE Ee Find all G3 PTT Subfolders Find Results 1 All Open Documents Matching lines Matching files Total files searched 3 gee Meena Find Results 1 Make sure the SAM ICE cable is connected from your board to your PC through the J13 connector Power the SAM4CP16CMB board In order to build the project click on the Bui d Solution button or on Build gt Build Solution SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Then download the
109. or otherwise to any intellectual property right is granted by this document or in connection with the sale of Atmel products EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMENT IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT INDIRECT CONSEQUENTIAL PUNITIVE SPECIAL OR INCIDENTAL DAMAGES INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS AND PROFITS BUSINESS INTERRUPTION OR LOSS OF INFORMATION ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice Atmel does not make any commitment to update the information contained herein Unless specifically provided otherwise Atmel products are not suitable for and shall not be used in automotive applications Atmel products are not intended authorized or warranted for use as components in applications intended to support or sustain life SAFETY CRITICAL MILITARY AND AUTOMOTIVE APPLICATIONS DISCLAIMER Atmel products are not designed
110. pp sam4cp16c_sam4cp16cmb_lib And also you can find it in the workspace project sam4co16c_PLC_examples which is contained in following Software folder Software G3_va b c_CENELEC g3 workspace sam4cp16c_sam4cp16cmb thirdparty g3 apps apps_workspace_sam4cp16c_sam4cp16cmb Remember that the J Link USB drivers must have been downloaded previously from the Segger webpage see section 6 1 4 and they depend on your operating system Previously to build and download to the boards several issues have to been taken into account e Frequency band to use coupling board e Operation modes Operation System Support e Initializing FW stack e Developing user application requirements SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 6 3 1 e Modify the configuration files according to user needs Next sections explains part of these points to get a proper project User application Atmel G3 PLC firmware stack has been intended to hold the application code developed by the user So the user can integrate his application code in the firmware package delivered by Atmel Basic procedure for performing this integration firmware configuration is commented below For more information about the stack and integration procedure see the Atmel G3 Firmware Stack doc43081 Step 1 Use the right Atmel G3 PLC code version for frequency band to work G3_va b c_CENELEC f
111. program in the internal flash of the SAM4CP16C by clicking on the Start Debugging pl and break button The first time Atmel Studio will ask to select the Debug Tool Select the on board SAM ICE the serial number in parenthesis differs from one Debug Tool to another see Figure 6 12 Figure 6 12 Select tool instance APPS PHY_TESTER_TOOL X Build N A N A Build Events Toolchain Selected debuager programmer Device SAM ICE 28011489 w Interface JAG vw dink Control Panel Tool Advanced JTAG Clock 4 00MHz Manual Clock JTAG Daisy chain settings Target device is not part of a JTAG daisy chain eh Position Name IRLength Device at position 1 has TDI pin connected directly to debugger Programming settings Erase entire chip Boot selection Unchanged v Once programmed start the code execution by clicking on the green arrow When the debug session is running the Stop button 4 allows you to stop the program execution and exit the debug session If you just want to stop the program and keep the debug session active simply I click on the Pause button If you modify any of the files of the project you need to do a Rebuild and not only a Build Do a right click on the project name in the Solution Explorer and then click on the Rebuild button Once the board is powered the green led D5 LEDO is blinking and the display DS1 shows the following message G3 COO Figure 6
112. pt as may be otherwise noted on the board kit 1 2 Electrical characteristics This section shows the electrical characteristics of the kit s boards See the following tables Table 1 1 Power Supply Requirements Parameter Condition Min Unit Typ EDG Isolation Voltage alee esta SUPPI ano 3000 Vac PLC coupling transformer 6 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Note that the SAM4CP16CMB can be supplied either with 100Vac or 230Vac by setting the proper jumpers pitch 5 08mm in the voltage selector J2 as depicted in the Figure 6 22 By default voltage jumper is set for 230Vac For more information about power supply see section 3 5 1 Notes 1 This current is measured when board is supplied with 100Vac and board is in worst consumption conditions That is when it emits against very low impedance in higher channel and it is supplying an extra board through the DC jack J15 Table 1 2 Power Consumption Parameter Condition Unit power FW PHY Tester Tool App Low Impedance Load PRIME LISN 2232 4440 1 mW Measured on Vpp 12V DCDC output TX Power Consumption FW PHY Tester Tool App High Impedance Load CISPR LISN 1344 1800 mW Measured on Vpp 12V DCDC output RX Power Consumption HEIST iste el ON EO 384 mW output Low Power Mode Current lt 1 Consumption Notes 1 These measurements were taken with a non optimi
113. re than 220ms to perform a Flash erase operation Figure 3 7 J14 jumper ERASE 4 Se ee i a APEERE oP Pls p La AEE ma SAM4CP16BMB v A SAMa CMe vil i Please refer to SAM4CP16C datasheet doc43080 for a further description on Atmel s website 3 5 2 2 SAM4CP16C Clocking SAM4CP16C requires a 24MHz crystal oscillator Y3 Figure A 3 for the PLC transceiver embedded peripheral This clock signal is used as internal reference time of the PLC transceiver and also to generate a 12MHz clock output that may be used by the SAM4CP16C input clock XIN when configured in bypass mode In this way only one high frequency crystal oscillator is required Nevertheless SAM4CP16CMB design also allows to use a dedicated crystal oscillator Y1 Figure A 3 if a stable frequency different of 12MHz is required as base for SAM4CP16C microcontroller cores For this option that is not mounted by default in the board R34 should be removed and R67 and R68 soldered they are not populated and remember that SAM4CP16C must be configured properly Atmel SAM4CP16C EK Kit User Manual USER GUIDE 19 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 A slow clock crystal oscillator of 32 768 kHz Y2 Figure A 3 is used as clock base in low power mode and for the embedded Real Time Clock RTC Clocking item is widely detailed in the datasheet doc43080 3 5 3 PLC Coupling Atmel PLC technology is purely digital
114. ready be correctly configured Finally click Open 88 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 75 PuTTY Configuration instance E PATTY Confguaton TT em Category E Session Options controlling local serial lines _ bogging Select a serial line G Terminal pects im Keyboard Serial line to connect to COM264 Bel hw Features E l 5 Window Speed baud 921600 ba Appearance ba Behaviour E Translation Stop bits 8 o 1 e Selection a Cela aty Flow control Configure the seral line Data bits In order to know if the boards were programmed successfully you can check the following e After that green led D5 LEDO is blinking This indicates that the DLMS EMU application is running on SAM4CP16C device e The LCD screen shows the following message G3 COO for Coordinator board and G3 DEV for Device board LCD message with DLMS EMU binary programmed for Coordinator Figure 6 76 and for Device Figure 6 77 Figure 6 76 LCD message for Coordinator Figure 6 77 LCD message for Device In the Terminal window main menu is displayed press Reset button in case board has been supplied previously to connect USB cable Once coordinator board has been supplied after 4 minutes time defined in dims_emu_coord h it starts the cycle process After this point statics will appear on the terminal Atmel
115. rs are e Modulation Scheme Allow to configure differential or coherent modulation scheme e Modulation Type Allow to select between BPSK QPSK 8PSK and robust BPSK e Tone Map Allow disabling sub bands it is dependent of bandplan selected Each band is activated or deactivated setting to 1 or O in the corresponding bit of the hex array The different sub bands are ordered in the hex array from least significant bit lower frequency sub band to most significant bit higher frequency sub band For example in CENELEC A bandplan 0x01 represents a tone map where only lower sub band is active as well as 0x20 is the tone map corresponding to a tone map with only the higher sub band active e Reed Solomon 2 Block This feature is only available for FCC and ARIB bandplans compiled firmware it allows introducing a second RS block as G3 PLC specification tells e TX Power Allow to decrease the transmission power in steps of 3 dB e Branch Configuration You can select the impedance branch transmission e Preemphasis Allow to introduce an attenuation for each sub band In this example we select Figure 6 41 the following transmission values e Modulation Scheme We select Differential e Modulation Type We select BPSK e Tone Map We select Ox3f e Branch Configuration We select Auto Atmel SAM4CP16C EK Kit User Manual USER GUIDE 59 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 e TX Power We selec
116. rs in the backup area and time stamping in the RTC will be performed Anti tamper pins can be used in all modes Date and number of tampering events are stored automatically Tampering input 0 TMPO is connected to switch button SW2 Wake up pins multiplexed with anti tampering functions are possible sources of wake up as well in case an anti tampering event is detected 3 5 4 5 User leds The board incorporates two user LEDs LEDO amp LED1 green and red D5 amp D6 Figure A 7 connected to PB14 and PB15 respectively of the SAM4CP16C Atmel SAM4CP16C EK Kit User Manual USER GUIDE 23 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 3 5 4 6 LCD An LCD consists of several segments pixels or complete symbols which can be visible or invisible A segment has two electrodes with liquid crystal between them When a voltage above a threshold voltage is applied across the liquid crystal the segment becomes visible The voltage must alternate to avoid an electrophoresis effect in the liquid crystal which degrades the display Hence the waveform across a segment must not have a DC component The SLCDC controller is intended for monochrome passive liquid crystal display LCD with up to 6 common terminals and up to 50 segment terminals SAM4CP16CMB board embeds aLCD DS1 Figure A 7 of 40 segments and 4 commons Some of the GPIOS with SLCDC segment functionality are multiplexed with other functions related to Xplained P
117. s point to point interface offers SPI and USART communication capabilities and requires one target board master and an extension module slave SAM4CP16CMB is an Xplained Pro target device with power supply extension connector SAM4CP16CMB Xplained Pro provides the following features e SPI from the SPI1 e UART from the USART1 e 12C from the TWIO e 2ADC inputs from PA4 and PB13 e 1 IRQ input from PA17 e 5 GPIO s from PA18 PB19 PB20 PB21 and PC8 SAM4CP16CMB is an Xplained Pro Master device with power supply extension connector J12 Figure A 8 3 5 5 5 RS 485 Interface J4 and J5 connectors see Figure A 8 can be used to implement a non isolated RS 485 daisy chain bus This hardware interface has several advantages to implement half duplex multi master communications protocol Jumper J3 enables 120 Ohms bus termination impedance that must be connected on the last device of the daisy chain bus see Figure A 8 The same SAM4CP16C UART USARTO is used to implement the RS 485 protocol like in the Base Node MIMO interface so if RS485 is used J8 must remain unconnected and jumper J11 must be set see Figure A 8 Atmel SAM4CP16C EK Kit User Manual USER GUIDE 25 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 4 ATPLCOUP007 Hardware 4 1 Overview ATPLCOUP007 is a single branch with voltage isolation PLC coupling board specially optimized for G3 PLC The goal of this design is to provide cu
118. stomers with a cheap performance transmission board in CENELEC A band for G3 PLC Figure 4 1 CENELEC bands C Band mit CSMA CD ti ON Sos SS X a 148 5 f kHz 4 2 Features The ATPLCOUP007v2 board includes the following features Voltage Isolation from mains with a transformer MSR EXL 165S LT soldered in top layer board e Single branch Low impedance optimized CENELEC A frequency band 35 kHz 91 kHz CENELEC EN50065 1 defined a range of low frequency bands for PLC in Europe A band 38 95 kHz frequency shall only be used for applications for monitoring or controlling the low voltage distribution network including energy usage of connected equipment and premises Figure 4 2 ATPLCOUP007v2 PLC Coupling board top amp bottom views Test point Test point Test point to measure the PLC signal TX led indication PLC transformer provides the voltage isolation froms mains a Test point 26 SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 4 3 Mechanical and user considerations ATPLCOUPO07 is delivered with the SAM4CP16C EK Board to board SMD connectors J1 and J2 Figure A 11 are used to connect the ATPLCOUP007 into connectors J6 and J7 of SAM4CP16CMB board Figure A 5 These J1 and J2 connectors are in bottom layer of ATPLCOUP007 and they have the following part numbers e J1 SAMTEC FTR 130 54 L S e J
119. t Full_ Gain e Preemphasis We select 0 and Full_ Gain You can select the tone mask feature It allows to disable carriers for each symbol as G3 specification tells So if you want a tone with null amplitude select Default option for the tone mask parameter specified for CENELEC A 86 FCC 72 and ARIB 54 Or Custom if you want to select other range frequencies If you do not use the tone mask feature select None Click the Next button to continue Figure 6 42 TX Test Parameters tab PeT ij Atmel PLC PHY Tester Tool v242 accel Transmission Parameters Tx Test Parameters Configuration Summary Description This tab allow to configure all necessary parameters related with a tranmission test Parameters are Time Interval interval between frame transmmition Number of Frames number of frames to be transmitted Message ascii message to be tranmitted Test Parameters Time Interval ms 100 Number of Frames 100 Message Atmel Enabling Unlimited Possibilities Atmel Enabling Unlimited Possibilities Following figure Figure 6 42 shows the TX Test Parameters tab This tab is where transmission test parameters are configured e Time Interval milliseconds desired interval between frame transmissions e Number of Frames number of frames to be transmitted e Message ASCII message to be transmitted These parameters must match the reception test parameters Figure 6 36 for the test to be successful De
120. t User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 3 5 1 Power supply SAM4CP16CMB board can be powered either with 100Vac or 230Vac by setting the proper jumpers in the voltage selector J2 Figure A 2 J1 IEC 320 C8 connector allows cable connection to mains grid This design uses an encapsulated transformer T1 Figure A 2 plus a full bridge rectifier D1 Figure A 2 to obtain a DC voltage without increasing noise in PLC frequency bands 42 to 472 kHz as may occur with switched ACDC power supplies F1 and VR1 are used as protective devices in the equipment input and F2 protects the transformer output against over current situations x By default the voltage jumpers configuration is for 230Vac See Figure 6 22 The maximum transformer output power of 14VA is oversized compared to the maximum current consumption of SAM4CP16CMB when it is used as a PLC service node However this design is intended to power up other development kits which may have considerable power consumption if they include components such TFT displays The unregulated DC voltage is used as input of the DCDC buck converter high frequency step down switching regulator U11 Figure A 2 which generates the configurable Vpp voltage Vopn is mainly used as power supply of the PLC class D amplifier and also as input of the 5V DCDC buck converter high frequency step down switching regulator U12 Figure A 2 5V
121. t eases the configuration of several transmissions e Apps Phy_Sniffer_Tool This application configures G3 PHY layer to monitor the PLC data traffic on SAM4CP16CMB boards and sends via serial communication this traffic to the ATPL Multiprotocol Sniffer tool Every coupling board is intended to be used in their corresponding channel s only e APPS DLMS_EMU_COORD_APP and APPS DLMS_EMU_DEV_APP The DLMS Emulator applications are examples using the Atmel G3 PLC stack and show how the G3 API should be used These applications are provided for both Device and Coordinator Applications configure the SAM4CP16CMB board as Nodes with DLMS Emulation capabilities and simulate the data exchange between the G3 Coordinator and the Device s The Device responds dummy DLMS messages after receiving data requests from the Coordinator b G3_va b c_FCC folder which contains five projects for IAR and Atmel Studio in an unique workspace to work in FCC bands frequency see g3 workspace sam4cp16c_sam4cp16cmb zip file e Apps _Phy_Tester_Tool This application configures G3 PHY layer and its serial interface to communicate with Atmel PLC PHY Tester Tool to send and receive PLC messages from to the PLC line and check the PLC transmission reception processes between SAM4CP16CMB boards e Apps Phy Tx Test Console This application lets the user to configure a proper set up to perform both EMC emissions and immunity tests on SAM4CP16CMB board These tests are based on the us
122. t folders of the packing kit Please do not hesitate to visit our web site to get the last kit updates Packing kit contents are 1 A welcome letter ATSAM4CP16C EK_WL which presents you the evaluation kit and the con tents 2 SAM4CP16C EK Kit User Manual doc43086 3 Hardware folder contents a SAM4CP16C datasheet doc43080 b Some application notes about hardware issues different Atmel PLC coupling boards crystal selection guidelines layout recommendations critical design guidelines etc c Schemes PCBs layout Gerbers and BOM files of SAM4CP16CMB ATPLCOUP0O0O7 and ATPLCOUPO06 boards 4 Software folder contents a G3_va b c_CENELEC folder which contains five projects for IAR and Atmel Studio in an unique workspace to work in CENELEC A frequency _ band see g3 workspace sam4cp16c_sam4cp16cmb zip file 8 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 e Apps _Phy_Tester_Tool This application configures G3 PHY layer and its serial interface to communicate with Atmel PLC PHY Tester Tool to send and receive PLC messages from to the PLC line and check the PLC transmission reception processes between SAM4CP16CMB boards e Apps Phy Tx_ Test Console This application lets the user to configure a proper set up to perform both EMC emissions and immunity tests on SAM4CP16CMB board These tests are based on the use of G3 PHY layer with a terminal console firmware tha
123. t signals defined conf project h to configure the work band used and the embedded sniffer conf slcdc h to enable the LCD signaling conf_uart_serial h to configure the serial UART conf usi_if h to configure the number of Ports Protocols managed by USI FreeRTOSConfig h to configure the Generic FreeRTOS peripheral control functions In addition to these configuration files there are four important files more for this project e dims_emu_coord c It is a file for the final user for the cycles application with the init and process defined e dims_emu_coord h It is a header file with the cycles application functions Also it contains some configuration constants which can be changed by the user depending on the number of Devices connected and the number of hops required to reach Coordinator is complex setups are used e _asif h It includes all the API header files required by ASF for the modules that you use in your project It is automatically updated every time you add or remove drivers from your project e main c In this file the G3 PLC stack is initialized and the processes of the main infinite loop 84 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 cate 6 73 Configuration files in IAR and AS x f Solution Explorer apps_dims_emu_coord apps_dims_emu_coord_appflash Debug lt y Debug apps_dims_emu_coord_appflash Detug va
124. tect backup mode entering conditions and also wake up events by means of its dedicated hardware 5V falling condition is the most recommended trigger event to enter backup mode on SAM4CP16CMB design e Configure PB23 as positive input of analog comparator and compare it with AREF e Once 5V rail falls below 4 5V depending on R70 R74 values e g mains grid connection has been removed the analog comparator interrupt is triggered e Before going to backup mode configure PB23 as wake up port to return to active mode once power supply is available again The wake up events allow the microcontroller to exit the backup mode When a wake up event is detected the Supply Controller performs a sequence which automatically enables the core and the SRAM power supply and clocks See Figure A 7 for details Lack of activity on VZ CROSS signal PB11 can also be used to enter in backup mode 3 5 4 4 Tamper and Wake Up The purpose of backup mode is to achieve the lowest possible power consumption in a system that executes periodic wake ups to perform tasks but which does not require fast start up time Wake up events allow the device to exit backup mode Force Wake Up pin FWUP can be used as a wake up source In SAM4CP16CMB board FWUP has been connected to switch button SW3 Anti tamper pins TMP0 TMP3 detect intrusion for example into a smart meter case Upon detection through a tamper switch automatic asynchronous and immediate clear of registe
125. th 133 data bytes length and 5 4 milliseconds time interval between PLC frames During the transmission green led LEDO is blinking indicating test is running And the yellow led PLC on ATPLCOUPO07 board blinks every time a PLC frame is sent In the reception board the red led LED1 blinks in every PLC frame reception SAM4CP16C EK Kit User Manual USER GUIDE 69 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 54 Menu when transmission is stopped ep COM PuTTY a m i j e 4 m mM om m t j m a r a gt pa re tr D m mo QO E gt M om M In case the configuration default has been changed the board keeps the configuration unless power shutdown If board is reset while keeping power supply on it will restart the configuration mode after start up 6 4 PLC application example 3 PHY Sniffer In this example we present you the G3 PHY Sniffer project Q3 PHY Sniffer project is able to monitor data traffic on the G3 PLC network by means of an SAM4CP16CMB board and the PC application ATPL Multiprotocol Sniffer For this example only one SAM4CP16CMB board is required and obviously a G3 network to be tracked Figure 6 55 SAM4CP16CMB board connection scheme A Atmel G3 PHY Sniffer USB PLC 70 SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 4 1 ATPL
126. th the SAM4CP16C and run the application Supplying the boards Please refer to 6 2 2 in order to know how to supply the SAM4CP16CMB boards USB connection Please refer to 6 2 3 in order to know how to connect the micro USB cable with the SAM4CP16CMB board Programming the embedded files It is commented in section 6 2 4 the way to program a board To program the board as Coordinator and Device process will be the same building the IDE project and downloading into the board Open the G3 workspace for SAM4CP16C platform SAM4CP16CMB_PLC_examples For that select your IDE tool and select the workspace according to your IDE in the Software folder Software g3_va b c_CENELEC g3 workspace sam4cp16c_sam4cp16cmb thirdparty g3 apps apps _ workspace_sam4cp16c_sam4cp16cmb Once you have loaded the workspace open the APPS _DLMS EMU _COORD_APP project This project is the Coordinator project Now you can build and download to the SAM4CP16CMB board After that open the APPS DLMS EMU_DEV_APP project This project is the Device project Now you can build and download to the other SAM4CP16CMB board Note that kits do not provide a J Link ARM or SAM ICE JTAG probe in order to connect to the user s host PC and the boards to download and debug the projects Remember that template application project is contained in the following Software folder Software G3_va b c_CENELEC g93 workspace sam4cp16c_sam4cp16cmb thirdparty g3 apps template_a
127. thirdparty g3 apps dims_emu_coord_app main c Ley TA Solution sam4cp16c_PLC_examples 5 projects wel file 4 APPS_DLMS_EMU_COORD_APP Sa Dependencies Sa Output Files La Libraries a sre 4 ASF gt common brief Example embedded application for ATMEL PLC PHY Solution Explorer Copyright c 2013 Atmel Corporation All rights reserved asf_license_start sam 4 thirdparty fq CMSIS gt freertos g3 t config asf h a Config h i dims_emu_coord c au dims_emu_coord h Gl main c fh APPS_DLMS_EMU_DEV_APP Sa Dependencies Ea Output Files page License Redistribution and use in source and binary forms with or without modification are permitted provided that the following conditions are met 1 Redistributions of source code must retain the above copyright notice this list of conditions and the following disclaimer 2 Redistributions in binary form must reproduce the above copyright notice this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution 3 The name of Atmel may not be used to endorse or promote products derived from this software without specific prior written permission Atmel Studio Editor 4 This software may only be redistributed and used in connection with an Atmel microcontroller product lt j Libraries p src fy APPS_PHY_SNIFFER_TOOL Sa Dependencies Sa Output Files
128. tion Control Channel Access Priority Last Segment Flag SegmentCount PduType CmdType SecurityEn SecurityLevel SecFrameCounter Keylndx SeqNumber PanldCompression DestAddrMode SrcAddrMode DestPAN SrcPAN DestAddress SrcAddress Length Pdu headerLen and payloadLen While the PLC traffic is logged into a database the software tries to infer the PLC network structure and status as seen by the PAN coordinator This information is shown in several docking views They are available on the menu View e Hexa view shows the hexadecimal display of the selected frame in the main view e Packet view shows the disassembled data of the selected frame in the main window All the specified fields on the G3 specification are shown e Filter view allows selecting the frames shown in the main view table To uninstall the ATPL Multiprotocol Sniffer tool from your computer go to Start gt All Programs gt ATMEL gt ATPL Multiprotocol Sniffer vX Y Z gt Uninstall For further information please refer to the tool s embedded help in the menu bar Atmel SAM4CP16C EK Kit User Manual USER GUIDE 77 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 5 Introduction to G3 PLC Stack PLC is a medium with such special characteristics asymmetry noise variation in time etc that make ita hostile environment for successful communication when users are not familiar with these issues On the PHY level G3 PLC is based on the OFDM
129. tmel PLC PHY Tester Tool Board is not responding please check serial port Verify Coupling h Warning The coupling board plugged in the main board must be the proper one 1 Check the coupling identifier that you can find in the coupling board If current coupling is not the proper one for binary flashed please remove it and connect the proper one Also verify that Vdd is the correct for the coupling board selected Otherwise the board could be seriously damaged Atmel Enabling Unlimited Possibilities Next gt Click the OK button and press Prev button to get back to Welcome tab Now press Disconnect button and check your connections Either you have not selected the right Enhanced COM port or the board is not supplied or the downloaded firmware is not the right After these operations you can retry to establish the communication again between the board and the computer Once the communication is right Product Information tab of the PHY Tester tool is shown below in Figure 6 34 Atmel SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 53 Figure 6 34 Product Information tab of the Atmel PLC PHY Tester tool Help Welcome Product Information Reception Parameters Rx Test Parameters Configuration Summary Description This tab shows information related with product identification model of the PCB and information about firmware version
130. tools and performance are described in chapter 6 1 To be able to develop applications build binaries and program the firmware on the SAM4CP16C device you can use the IAR Workbench or the Atmel Studio In order to program the firmware on the board the JTAG connector is used see section 3 5 5 2 about JTAG programming mode and JTAG probe is required See previous Figure 6 24 which shows the JTAG connector J13 of the board Note that kits do not provide a J Link ARM or SAM ICE JTAG probe in order to connect to the user s host PC and the boards to download and debug the projects The process to load the file should be as is explained below in that process we use a programming tool J Link Tool Remember that the J Link USB drivers must have been downloaded previously from the Segger webpage see section 6 1 4 and they depend on your operating system 1 Place the JTAG connector of the J Link or SAM ICE in the J13 JTAG connector of the board Check pin number 1 of J13 connector to place the cable in the right position See the Figure 6 24 2 Switch on the power supply of the board 3 There are two ways to program the board a Launch the AR or Atmel Studio and select the PHY Tester tool project Build the project apps_phy tester atsin or apps phy tester eww to generate the output file to program Now 48 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 you can downlo
131. ture That structure is showed in the Figure 6 9 Building programming and debugging a project with AS Now you can create build program and debug the Atmel G3 Examples using the AS But before to do this you can configure and customize your project For example it is very important to enable line number display feature in Atmel Studio 6 2 editor For that e Access to Editor Function by clicking on Tools gt Options and access to All Languages window in the Text Editor tab e Enable the Display Line numbers function SAM4CP16C EK Kit User Manual USER GUIDE Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 39 40 Figure 6 10 Line numbers enabling Options b Environment Statement completion b Projects and Solutions Auto list members b Source Control E Hide advanced members Text Edit Parameter information General i File Extension Settings 4 All Languages Enable virtual space General E Word wrap Tabs b Assembler Basic GCC Plain Text XML Line numbers Show visual glyphs for word wrap Apply Cut or Copy commands to blank lines when there is no selection Display gt iliina Enable single click URL navigation b Atmel Gallery Navigation bar gt Atmel Software Framework Note This page sets options for all languages To change options for only one b Builder language select the desired language from the tree on the left Device and Tool libraries
132. uide_23 Sep 2015 3 SAM4CP16CMB Hardware 3 1 Overview This section summarizes the Atmel SAM4CP16CMB board design It introduces system level concepts such as power supply SoC PLC coupling peripherals and interface board SAM4CP16CMB is a G3 multi purpose development board based on the SAM4CP16C ARM Cortex M4 microcontroller which incorporates a G3 PLC peripheral SAM4CP16CMB modem board provides a platform to develop a complete communications system over G3 PLC technology Figure 3 1 SAM4CP16CMB board 3 2 Features The SAM4CP16CMBv1 board includes the following features e Power supply Non switched ACDC isolated power supply 100 230Vac 50 60Hz 5 volts rail is accessible by means of a DC Jack connector J15 e SAM4CP16C Application Master Core CM4P0 e ARM Cortex M4 running at up to 120 MHz e Memory Protection Unit MPU e DSP Instruction e Thumb 2 instruction set e Instruction and Data Cache Controller with 2 Kbytes Cache Memory e Memories Atmel SAM4CP16C EK Kit User Manual USER GUIDE 13 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 1024 Kbytes of Embedded Flash for Program Code I Code bus and Program Data D Code bus with Built in ECC 2 bit error detection and 1 bit correction per 128 bits 128 Kbytes of Embedded SRAM SRAMO for Program Data System bus 8 Kbytes of ROM with embedded boot loader routines UART and In Application Programming IAP
133. unication technology This document describes how to starting to work with the Atmel Evaluation Kit SAM4CP16C EK by explaining the PC tools software examples and hardware provided and giving you the necessary documents to create your PLC application by means of small and easy examples 2 1 Design support To make it faster and easier for you to evaluate prototype develop and program with Atmel products we offer a variety of design resources including development tools software boards kits and documentation For any technical support request please refer to our Design Support webpage http www atmel com design support There any user can search the Atmel knowledge base to find tips help topics and answers to common questions In case that the obtained information is not helpful any user can Open a Support Case indicating a description of the case product information etc 2 2 SAM4CP16C EK contents Additional information of this user guide as hardware documentation software projects and PC tools to get started can be found in our Atmel website http www atmel com tools ATSAM4CP16C EK aspx To download this information you need a myAtmel account www aimel com myAimel After that please contact with plc atmel com to get the password access kit contents site Once you have access to the ATSAM4CP16C Evaluation Kit you can find the available releases for the SAM4CP16C EK You can get these items navigating through the differen
134. v2 46 Click Agree to continue 44 SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Choose which features of Atmel PLC PHY Tester Tool you want to install Check the components you want to install and uncheck the components you don t want to install Click Next to continue Select components to install Atmel PLC PHY Tester Tod pa Position Your mouse over a component to see its description Space required 53 7MB Nullsoft Install System v2 46 Click Next Figure 6 20 Installation process slide 5 Install Location Choose the folder in which to install Atmel PLC PHY Tester Tool Setup will install Atmel PLC PHY Tester Tool in the following folder To install in a different folder dick Browse and select another folder Click Install to start the installation C Program Files x86 Atmel Atmel PLC PHY Tester Tool 2 3 2 Space required 54 1MB Space available 288 7GB Nullsoft Install System v2 46 Setup will install the program in the Destination Folder To install in a different folder click Browse and select your destination folder Click Install Atmel SAM4CP16C EK Kit User Manual USER GUIDE 45 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 2 2 46 Plague 6 21 Installation process slide 6 Completing the Atmel PLC PHY Tester Tool Setup Wizard Atmel PLC PHY Tester Tool has been installed on
135. voltage rail is only used to provide an external power supply by means of DC jack connector J15 Figure A 8 3V3 is linearly regulated U13 Figure A 2 and is used to power up SAM4CP16C and all other digital devices To measure the current consumption of the 3volts power supply connect an ammeter instead of the jumper J19 Figure 3 4 Power supply diagram Transformer 12 16V 5V amp Buck Buck SV 3V3 V Rectifier Conveter Conveter LDO Switching frequency of DCDC buck converters used in this evaluation kit has been chosen to be higher than maximum PLC frequency band supported by SAM4CP16C device We recommend characterizing the potential impact of the selected SMPS for customer designs on the G3 transmission channel Voo could be two different voltages 16volts or 12 volts depending on the jumper position If the jumper is not placed the voltage Vpop is 16 volts If the jumper is placed in J20 Voo is 12 volts By default the board has a jumper so board provides 12 volts These different voltages are used to supply the PLC coupling driver board Be careful with this issue because the PLC coupling driver board ATPLCOUP XXX could be damaged See the features of these boards to know the working voltage Atmel SAM4CP16C EK Kit User Manual USER GUIDE 17 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 3 5 1 1 18 Figure 3 5 Vpp selection in SAM4CP16CMB board Jumper configuration y
136. you can check the following e Once board is supplied leds LEDO and LED1 blink several times e After that green led D5 LEDO is blinking This indicates that the PHY TX Console application is running on SAM4CP16C device e The LCD screen shows the following message G3 PTX Figure 6 50 LCD message with PHY TX Console binary programmed In the Terminal window main menu is displayed press Reset button in case board has been supplied previously to connect USB cable Atmel SAM4CP16C EK Kit User Manual USER GUIDE 67 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 Figure 6 51 Main menu gp CON PuTTY o f Na gt a a gt 5 H m t m os The description of each field is the following e 0 Select TX level 0 is OdB of attenuation and every step increments the attenuation in 3qB In the current firmware the maximum attenuation value is 10 80dB The value could be from 0 to 31 because it is defined in the G3 specification e 1 Select Modulation Scheme In this example we choose 3 that is Differential Robust e 2 Select time period between messages to transmit us 5400us in this example e 3 Select data to transmit In this example we choose Random Data and 133 bytes This value 133 bytes is the maximum for Robust mode in CENELEC e 4 Select TX tone map Ox3F in this example e 5 Select TX preemphasis 0 in this example e v View Tx
137. your computer Click Finish to dose this wizard Click Finish Now the program is installed in your computer and a shortcut should have been created in your desktop Supplying the boards Kits are provided with power cord cables in order to connect the boards to the mains Mains connector is shown below in Figure 6 22 Please connect the provided power cord cable with the kit to the Power Cord Connector J1 in order to supply the board Figure 6 22 SAM4CP16CMB mains and voltage jumper selector Jumper Voltage Selector 230 Vac option 4 i g vA C ETA T i Jl ey Dk eo Note that the SAM4CP16CMB board can be supplied either with 100Vac or 230Vac by setting the proper jumpers in the voltage selector J2 as depicted in the Figure 6 23 By default voltage jumper is set for 230Vac For more information about power supply section see section 3 5 1 Figure 6 23 Jumper configuration for 100Vac or 230Vac f i AY A 115VAC L SAM4CP16C EK Kit User Manual USER GUIDE Atmel Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 6 2 3 USB connection By default the programmed firmware for Atmel PLC PHY Tester tool establishes serial communication with UARTO Boards have such UARTO available either by micro B USB connector J9 or the triple pin row CMOS connector J16 See the figure below and sections 3 5 5 3 for more information about the USB device Kits are provided with two
138. zed FW with the PHY TX Test Console project included in the kit using a default configuration in RX mode and a differential robust modulation scheme and data random with a length of 100 bytes of payload in TX mode from a power consumption point of view and they highly depend on the architecture of the power supplies These measurements correspond to the whole PCBA design and not only to SAM4CP16C device All PCB peripherals are supplied i e LCD display and ATPLCOUPO007 coupling board is emitting in channel 1 Refer to Atmel SAM4CP16C datasheet for an optimized power consumption measurement result 2 Output current of a 3V CR1225 battery Atmel SAM4CP16C EK Kit User Manual USER GUIDE 7 Atmel 43086C ATPL SAM4CP16C EK Kit User Manual UserGuide_23 Sep 2015 2 Evaluation Kit Overview SAM4CP16C is a Flash microcontroller based on a dual high performance 32 bit ARM Cortex M4 RISC processor embedding a G3 PLC transceiver for Power Line Communication that implements G3 CENELEC A FCC and ARIB profiles SAM4CP16C is oriented to a wide range of Smart Grid applications such as Smart Metering Lighting Industrial Home Automation Home and Building Energy Management Systems Solar Energy and Plug in Hybrid Electric Vehicle Charging Stations SAM4CP16CMB is PLC multi purpose modem board based on the SAM4CP16C microcontroller This development board provides a full featured platform to develop a complete communications system over Power Line Comm
Download Pdf Manuals
Related Search
Related Contents
Tarif - Commission du droit d`auteur du Canada MONITOR DE PRESIÓN ARTERIAL AUTOMÁTICO DE Manuel d`installation PDFファイル Cisco Systems UCSEZB230EX256 Server User Manual I saw error code on the NVR software, help! Aluratek LIBRE Installation Guide 資料ダウンロード(2057.1KB) Copyright © All rights reserved.
Failed to retrieve file