LUFA 101122 BETA Released

Those who poke their heads in here once a week or so to read my latest ramblings will have noticed a rather obvious quiet from Camp Dean these past few weeks. The sad and boring explanation for my semi leave of absence is that I’ve just been too damn busy with my University work to find time to write; last week I was up until 1-2AM each day just so I could answer a few emails. If you’re one of the half dozen or so still waiting on a response, thanks for being patient.

Last Saturday I spent my first – and hopefully last – Saturday at University coding all day to get a project completed. It’s never nice to have a deadline looming and find that everyone in your group is too caught up with other assignments to finish a major project, but three days later and the code for our 5-week VHDL project is now done. Never again.

Yesterday I had my Third Year Project practical assessment, where we all crowd around our humorous-but-acid-tongued lecturer while we demonstrated our projects we’ve been building and coding for the last few weeks. It’s quite a nerve racking moment; in roughly two minutes, you get essentially an immediate pass/fail in the subject. I wish I had my project board photos with me right now – some people might remember back a few weeks when I struggled with my board layout design – but no matter, I’ll post them tomorrow. The final board actually turned out quite well, and I was pleased with the overall lack of hardware problems I encountered, although forgetting to route the SCK pin to the ADC was a bit of a dumb mistake.

I was hoping that a new piece of test hardware I ordered a few weeks ago, a Rigol DS1052E – by all accounts a wonderful piece of kit for the money – would have arrived by now so I could test it out and give my thoughts, but alas it was not meant to be. When it does eventually arrive I’ll try to get over my tap-dancing long enough to plug it in and see what it’s like. On the flipside, I’ve now got a nice collection of interesting products/projects in my room that I’d love to talk about in their place, but sadly they’re pre-release and thus cannot be publicly disclosed. I’ll have to pull an Apple and throw black cloaks over them if I take any photos of my desk.

As a last piece of personal news, my Norwegian work permit has now been approved, so in just over a month I’ll definitively be working at Atmel for the Summer (or their Winter, I’ve no idea which side I’m supposed to refer to in this situation). If you want me to hand-deliver your comments straight to the Applications team, send me an email. No explicatives, please :).

Now on to the good stuff. Despite my lack of time to make any really groundbreaking changes, LUFA 101122 is now in official beta! This beta cycle will last a full month to ensure that all the bugs are properly stamped out – after all, LUFA is now being used in some serious commercial products. Over the past few months I’ve been slowly improving things and expanding the board hardware support, so that the new release is better than ever. A bunch of these changes has been my shift towards moving related exclusive-or constants into enums rather than defines, and adding in proper prefix pseudo-namespaces to the class driver defines, in the name of cleaning up the codebase. That means some short term find-and-replace pain for existing projects when upgrading, for a long term gain.

I’d like to publicly thank everyone once again who has continue to support me and my project so much; your suggestions, questions, comments, bug reports and hardware has been instrumental in keeping me motivated and inspired for development. Special thanks to Rob Davies for his generous loan of a USB Analyzer in my time of need, to help debug some thorny USB communication problems. I love the internet sometimes.

Download the latest BETA: Release Package | Prebuilt Documentation | Online Documentation


LUFA 101122 BETA Changelog

New:

  • Added new SCSI_ASENSE_NOT_READY_TO_READY_CHANGE constant to the Mass Storage class driver, to indicate when a previously not ready removable medium has now become ready for the host’s use (thanks to Martin Degelsegger)
  • Moved the Pipe and Endpoint stream related code to two new USB library core source files EndpointStream.c and PipeStream.c
  • Added new USB_Device_GetFrameNumber() and USB_Host_GetFrameNumber() functions to retrieve the current USB frame number
  • Added new USB_Host_EnableSOFEvents(), USB_Host_DisableSOFEvents() and EVENT_USB_Host_StartOfFrame() for the user application handling of USB Start of Frame events while in USB Host mode
  • Added new PRNT_Host_BytesReceived(), PRNT_Host_ReceiveByte(), PRNT_Host_SendByte() and PRNT_Host_Flush() functions to the Print Host Class driver
  • Added class specific descriptor alternative struct type defines with standard USB-IF element naming
  • Added new project makefile template to the library and moved board driver stub files into in a new “CodeTemplates” directory
  • Added board hardware driver support for the Olimex AVR-USB-162 development board (thanks to Steve Fawcett)
  • Added board hardware driver support for the Kernel Concepts USBFOO development board
  • Added board hardware driver support for the Linnix UDIP development board
  • Added board hardware driver support for the Busware BUI development board
  • Added board hardware driver support for the Arduino Uno development board
  • Added board hardware driver support for the Busware CUL V3 868MHZ radio board (thanks to Dirk Tostmann)
  • Added board hardware driver support for the Blackcat USB JTAG board (thanks to the PSGroove team)
  • Added board hardware driver support for the Maximus board (thanks to the PSGroove team)
  • Added board hardware driver support for the Minimus board (thanks to the PSGroove team)

Changed:

  • Removed complicated logic for the Endpoint_ConfigureEndpoint() function to use inlined or function called versions depending of if the given bank size is a compile time constant, as the compiler does a better job of optimizing with basic code
  • Changed over all device demos to use a clearer algorithm for the configuring of the application’s endpoints
  • Added missing DataflashManager_CheckDataflashOperation() function to the MassStorageKeyboard demo, removed redundant SCSI_Codes.h file as these values are part of the MassStorage Class Driver
  • Added compile time error to the AVRISP-MKII project when built for the U4 chips, as the default VTARGET detection ADC channel does not exist on these chips (thanks to Marco)
  • Changed all Device mode LowLevel demos and Device Class drivers so that the control request is acknowledged and any data transferred as quickly as possible without any processing inbetween sections, so that long callbacks or event handlers will not break communications with the host by exceeding the maximum control request stage timeout period
  • Changed the signature of the CALLBACK_USB_GetDescriptor() callback function so that the descriptor pointer is const, to remove the need for extra casting inside the callback (thanks to Jonathan Kollasch)
  • Reduced HOST_DEVICE_SETTLE_DELAY_MS to 1000ms down from 1500ms to improve device compatibility while in USB Host mode
  • Changed over all demos, drivers and internal functions to use the current frame number over the Start of Frame flag where possible to free up the Start of Frame flag for interrupt use in the user application
  • All project makefiles now correctly clean intermediate build files from assembly and C++ sources (thanks to Daniel Czigany)
  • Removed the EVENT_USB_InitFailure() event, not specifying a USB mode correctly now defaults to UID selection mode
  • Renamed and moved class driver common constant definitions to make the naming scheme more uniform
  • Changed default value for the reset polarity parameter in the AVRISP-MKII project so that it defaults to active low drive
  • Changed configuration descriptor parser for all host mode projects and class drivers to ensure better compatibility with devices
  • Moved the USB mode specifier constants into a new enum, so that they are semantically related to one another
  • Renamed ENDPOINT_DOUBLEBANK_SUPPORTED() to ENDPOINT_BANKS_SUPPORTED() and changed it to return the maximum number of supported banks for the given endpoint

Fixed:

  • Fixed USB_GetHIDReportItemInfo() function modifying the given report item’s data when the report item does not exist within the supplied report of a multiple report HID device
  • Fixed MassStorage based demos and projects resetting the SCSI sense values before the command is executed, leading to missed SCSI sense values when the host retrieves the sense key (thanks to Martin Degelsegger)
  • Fixed critical pipe/endpoint memory allocation issue where the bank memory address space could be silently overlapped in the USB controller if the endpoints or pipes were allocated in anything other than ascending order (thanks to Martin Degelsegger)
  • Fixed USBtoSerial and Benito project SetLineEncoding calls failing if the USART is busy, due to the RX ISR delaying the control request handler
  • Fixed LowLevel PrinterHost demo not sending control requests to the attached printer with the correct printer interface wIndex value
  • Added LEDs_ToggleLEDs() function to several board LED drivers which were missing it (thanks to Andrei Krainev)
  • Fixed SET FEATURE and CLEAR FEATURE control requests directed at an unconfigured endpoint causing request timeouts
  • Fixed incorrect signature reported in the CDC class bootloader for the ATMEGA32U2
  • Fixed USB_Host_ClearPipeStall() incorrectly determining the endpoint direction from the currently selected pipe
  • Fixed JTAG_DEBUG_POINT() and JTAG_DEBUG_BREAK() macros not compiling under pure C99 standards mode
  • Fixed endpoint selection within the CALLBACK_HID_Device_CreateHIDReport() callback function causing broken GET REPORT requests
  • Fixed incorrect command name for EEPROM memory programming in the makefile dfu-ee target
  • Fixed BootloaderCDC project failing on some operating systems due to removed Line Encoding options (thanks to Alexey Belyaev)
  • Fixed incorrect LEDs_ChangeLEDs() function in the Benito board LED driver
  • Fixed incorrect USB_DeviceState value when unconfiguring the device without an address set
  • Fixed broken FLASH/EEPROM programming in the AVRISP-MKII clone project when writing in non-paged mode and the polling byte cannot be used
  • Fixed SPI driver not explicitly setting /SS and MISO pins as inputs when SPI_Init() is called
  • Fixed ISR definition conflict in the XPLAIN bridge between the software UART and the AVRISP-MKII ISP modules
  • Fixed random enumeration failure while in device mode due to interrupts causing the Set Address request to exceed maximum timings
  • Fixed MIDI_Host_Flush() not aborting early when the specified MIDI host interface was not configured
 

Comments: 1

Leave a reply »

 
 
 

Thanks for the update Dean, and congrats on the job opportunity at atmel! That should be pretty awesome.

 

Leave a Reply

 
(will not be published)
 
 
Comment
 
 

 

Vital Stats

  • 35 Years Old
  • Australian
  • Lover of embedded systems
  • Firmware engineer
  • Self-Proclaimed Geek

Latest Blog Posts

RSS