1*34fd36daSMatthias Ringwald# BTstack Port for SAMV71 Ultra Xplained with ATWILC3000 SHIELD 27d82eb50SMatthias Ringwald 37d82eb50SMatthias RingwaldThis port uses the [SAMV71 Ultra Xplained Ultra](http://www.atmel.com/tools/atsamv71-xult.aspx) evaluation kit with an [ATWILC3000 SHIELD](http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=ATWILC3000-SHLD). The code is based on the Advanced Software Framework (ASF) (previously know as Atmel Software Framework). It uses the GCC Makefiles provided by the ASF. OpenOCD is used to upload the firmware to the device. 47d82eb50SMatthias Ringwald 57d82eb50SMatthias Ringwald## Create Example Projects 67d82eb50SMatthias Ringwald 77d82eb50SMatthias RingwaldTo create all example projects in the example folder, you can run: 87d82eb50SMatthias Ringwald 97d82eb50SMatthias Ringwald $ make 107d82eb50SMatthias Ringwald 1142c38c4aSMilanka Ringwald## Compile Example 127d82eb50SMatthias Ringwald 137d82eb50SMatthias RingwaldIn one of the example folders: 147d82eb50SMatthias Ringwald 157d82eb50SMatthias Ringwald $ make 167d82eb50SMatthias Ringwald 177d82eb50SMatthias RingwaldTo upload the firmware: 187d82eb50SMatthias Ringwald 19895b2d2aSMatthias Ringwald $ make flash 207d82eb50SMatthias Ringwald 217d82eb50SMatthias RingwaldYou need to connect the the Debug USB to your computer. 227d82eb50SMatthias Ringwald 237d82eb50SMatthias Ringwald## Debug output 247d82eb50SMatthias Ringwaldprintf is routed to USART1, which is connected to the virtual serial port. To get the console output, open a terminal at 115200. 257d82eb50SMatthias Ringwald 267d82eb50SMatthias RingwaldIn btstack_config.h, additional debug information can be enabled by uncommenting ENABLE_LOG_INFO. 277d82eb50SMatthias Ringwald 2825d9a2cdSMatthias RingwaldAlso, the full packet log can be enabled in the main() function on main.c by uncommenting the hci_dump_init(..) line. The console output can then be converted into .pklg files for OS X PacketLogger or WireShark by running tool/create_packet_log.py 297d82eb50SMatthias Ringwald 307d82eb50SMatthias Ringwald## TODOs 317d82eb50SMatthias Ringwald - Implement hal_flash_sector.h to persist link keys 327d82eb50SMatthias Ringwald 337d82eb50SMatthias Ringwald## Issues 347d82eb50SMatthias Ringwald - Bluetooth UART driver uses per-byte interrupts and doesn't work reliable at higher baud rates (921600 seems ok, 2 mbps already causes problems). 357d82eb50SMatthias Ringwald - An older XDMA-based implementation only sends 0x00 bytes over the UART. It might be better to just read incoming data into two buffers, (e.g. using a two element linked list with XDMA), and raising RTS when one buffer is full. 36