<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Kinetis Microcontrollers中的主题 Re: Trying to Run USB Audio Example Code On FRDM-KL25Z</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Trying-to-Run-USB-Audio-Example-Code-On-FRDM-KL25Z/m-p/357094#M17899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you really using the 4.0.3 stack? The latest released one is V4.1.1 and is what I would suggest.&lt;/P&gt;&lt;P&gt;Actually depending on the compiler (GNU ARM as it seems?), these alignment warnings are a real problem in my view.&lt;/P&gt;&lt;P&gt;I have used the 4.1.1. stack and ported/fixed some of these, and published as Processor Expert components/projects.&lt;/P&gt;&lt;P&gt;I have done USB CDC, HID (KBD and MOUSE) plus MSD, but not audio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached for you a project (USB CDC for FRDM-KL25Z) you could use or compare.&lt;/P&gt;&lt;P&gt;The project includes all sources, plus an S19 file so you can load it with the FRDM bootloader (no need to compile things).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other examples are on GitHub (but most require extra Processor Expert components, see &lt;A href="http://mcuoneclipse.com/2013/05/09/processor-expert-component-peupd-files-on-github/" title="http://mcuoneclipse.com/2013/05/09/processor-expert-component-peupd-files-on-github/"&gt;Processor Expert Component *.PEupd Files on GitHub | MCU on Eclipse&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Description is on &lt;A href="http://mcuoneclipse.wordpress.com/2012/09/30/tutorial-usb-cdc-with-the-kl25z-freedom-board/" title="http://mcuoneclipse.wordpress.com/2012/09/30/tutorial-usb-cdc-with-the-kl25z-freedom-board/"&gt;http://mcuoneclipse.wordpress.com/2012/09/30/tutorial-usb-cdc-with-the-kl25z-freedom-board/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Other projects are on GitHub: &lt;A href="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples" title="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples"&gt;mcuoneclipse/Examples at master · GitHub&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Aug 2014 19:06:45 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2014-08-13T19:06:45Z</dc:date>
    <item>
      <title>Trying to Run USB Audio Example Code On FRDM-KL25Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Trying-to-Run-USB-Audio-Example-Code-On-FRDM-KL25Z/m-p/357093#M17898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to run USB audio example code on the KL25Z freedom board, once I get a working project then it is easier to understand the mechanisms and customize it for my project's needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using CW10.6 and Freescale USB Stack v4.0.3. I can compile and download the USB_AUDIO_DEVICE_MKL25Z128_PEx demo; albeit a huge (and uncomfortable) list of warnings from pragma's and&amp;nbsp; unused variables. (see below) This is "out of the box" unhampered project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But upon connecting to the PC, the PC does not recognize the USB peripheral. I receive "USB Device Not Recognized", if I open the device status pane it reads "Windows has stopped this device because it has reported problems. (Code 43)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have similar difficulties with all the USB demos for the KL25 and K20 board projects (USB audio and CDC). Is there something silly that I am doing on my end?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In file included from ../Sources/USB/app/audio_generator/audio_generator.c:23:0:&lt;/P&gt;&lt;P&gt;C:/Freescale/Freescale USB Stack v4.0.3/ProcessorExpert/Examples/Device/Audio/USB_AUDIO_DEVICE_MKL25Z128_PEx/Sources/USB/app/common/kinetis/hidef.h:20:0: warning: ignoring #pragma gcc_extensions on [-Wunknown-pragmas]&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;C:/Freescale/Freescale USB Stack v4.0.3/ProcessorExpert/Examples/Device/Audio/USB_AUDIO_DEVICE_MKL25Z128_PEx/Generated_Code/usb_devapi.h:216:0: warning: ignoring #pragma options align [-Wunknown-pragmas]&lt;/P&gt;&lt;P&gt;../Sources/USB/app/audio_generator/audio_generator.c: In function 'TestApp_Init':&lt;/P&gt;&lt;P&gt;../Sources/USB/app/audio_generator/audio_generator.c:120:14: warning: variable 'error' set but not used [-Wunused-but-set-variable]&lt;/P&gt;&lt;P&gt;../Sources/ProcessorExpert.c:38:6: warning: return type of 'main' is not 'int' [-Wmain]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_devapi.h:216:0: warning: ignoring #pragma options align [-Wunknown-pragmas]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_audio.c: In function 'USB_Service_Audio_Status_Interrupt':&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_audio.c:93:12: warning: variable 'producer' set but not used [-Wunused-but-set-variable]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_audio.c: In function 'USB_Service_Audio_Isochronous_IN':&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_audio.c:161:21: warning: variable 'iso_in_recv' set but not used [-Wunused-but-set-variable]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_audio.c:160:12: warning: variable 'producer' set but not used [-Wunused-but-set-variable]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_audio.c: In function 'USB_Audio_Get_Feature_Unit':&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_audio.c:784:12: warning: variable 'status' set but not used [-Wunused-but-set-variable]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_devapi.h:216:0: warning: ignoring #pragma options align [-Wunknown-pragmas]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:31:13: warning: 'USB_Device_Init_Params' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:32:13: warning: 'USB_Control_Service' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:33:13: warning: 'USB_Control_Service_Handler' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:34:15: warning: 'USB_Strd_Req_Get_Status' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:35:15: warning: 'USB_Strd_Req_Feature' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:36:15: warning: 'USB_Strd_Req_Set_Address' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:37:15: warning: 'USB_Strd_Req_Get_Config' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:38:15: warning: 'USB_Strd_Req_Set_Config' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:39:15: warning: 'USB_Strd_Req_Get_Interface' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:40:15: warning: 'USB_Strd_Req_Set_Interface' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:41:15: warning: 'USB_Strd_Req_Sync_Frame' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:42:15: warning: 'USB_Strd_Req_Get_Descriptor' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:43:13: warning: 'USB_DCI_CallBack' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:44:13: warning: 'USB_DCI_SetAddressCallback' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:45:15: warning: 'USB_DCI_Get_BDT_Index' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_class.c:46:15: warning: 'USB_DCI_Validate_Param' declared 'static' but never defined [-Wunused-function]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_devapi.h:216:0: warning: ignoring #pragma options align [-Wunknown-pragmas]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_dci.c: In function 'USB_DCI_SetAddressCallback':&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_dci.c:86:44: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_dci.c: In function 'USB_DCI_OnDeviceSetupPacket':&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_dci.c:257:53: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_devapi.h:216:0: warning: ignoring #pragma options align [-Wunknown-pragmas]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_descriptor.c: In function 'USB_Desc_Set_Cur_Volume':&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_descriptor.c:851:12: warning: variable 'volume' set but not used [-Wunused-but-set-variable]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_devapi.h:216:0: warning: ignoring #pragma options align [-Wunknown-pragmas]&lt;/P&gt;&lt;P&gt;../Generated_Code/usb_framework.c:42:3: warning: missing braces around initializer [-Wmissing-braces]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2014 18:02:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Trying-to-Run-USB-Audio-Example-Code-On-FRDM-KL25Z/m-p/357093#M17898</guid>
      <dc:creator>marktrainer</dc:creator>
      <dc:date>2014-08-13T18:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to Run USB Audio Example Code On FRDM-KL25Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Trying-to-Run-USB-Audio-Example-Code-On-FRDM-KL25Z/m-p/357094#M17899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you really using the 4.0.3 stack? The latest released one is V4.1.1 and is what I would suggest.&lt;/P&gt;&lt;P&gt;Actually depending on the compiler (GNU ARM as it seems?), these alignment warnings are a real problem in my view.&lt;/P&gt;&lt;P&gt;I have used the 4.1.1. stack and ported/fixed some of these, and published as Processor Expert components/projects.&lt;/P&gt;&lt;P&gt;I have done USB CDC, HID (KBD and MOUSE) plus MSD, but not audio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached for you a project (USB CDC for FRDM-KL25Z) you could use or compare.&lt;/P&gt;&lt;P&gt;The project includes all sources, plus an S19 file so you can load it with the FRDM bootloader (no need to compile things).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other examples are on GitHub (but most require extra Processor Expert components, see &lt;A href="http://mcuoneclipse.com/2013/05/09/processor-expert-component-peupd-files-on-github/" title="http://mcuoneclipse.com/2013/05/09/processor-expert-component-peupd-files-on-github/"&gt;Processor Expert Component *.PEupd Files on GitHub | MCU on Eclipse&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Description is on &lt;A href="http://mcuoneclipse.wordpress.com/2012/09/30/tutorial-usb-cdc-with-the-kl25z-freedom-board/" title="http://mcuoneclipse.wordpress.com/2012/09/30/tutorial-usb-cdc-with-the-kl25z-freedom-board/"&gt;http://mcuoneclipse.wordpress.com/2012/09/30/tutorial-usb-cdc-with-the-kl25z-freedom-board/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Other projects are on GitHub: &lt;A href="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples" title="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples"&gt;mcuoneclipse/Examples at master · GitHub&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2014 19:06:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Trying-to-Run-USB-Audio-Example-Code-On-FRDM-KL25Z/m-p/357094#M17899</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2014-08-13T19:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to Run USB Audio Example Code On FRDM-KL25Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Trying-to-Run-USB-Audio-Example-Code-On-FRDM-KL25Z/m-p/357095#M17900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for getting back. I am using all "defaults" in the IDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I d/l the Freescale USB Stack v4.1.1 stack and installed it. I am using the project in the following folder:&lt;BR /&gt;&lt;EM&gt;C:\Freescale\Freescale USB Stack v4.1.1\Source\Device\app\audio_generator\cw10\kinetis_k20\.project&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is not straight forward on the freedom board (FRDM-K20D50M).&lt;/P&gt;&lt;P&gt;When I run &amp;amp; debug, I had to make a new connection for OpenSDA. In that I had to select a checkbox (for the first time in my memory) titled "Use SWD reduced pin protocol for communications" just to get it to connect to the board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on Eli's KL25 tutorial, I needed to change the high gain HGO0 in MCG_C2 register in order to keep the system from hanging on the pll_init() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now it seems to hand on the following line number&lt;BR /&gt;2364: while (!(MCG_S &amp;amp; MCG_S_OSCINIT0_MASK)){};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I finally resorted to porting over the mcg.c and mcg.h files into the project. now I can get it to work, but for some reason I cannot get a connection for debug now on this project using OpenSDA (freedom board) - I can share those errors if interested. I now resort to the flash tool to download the binary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The USB enumerated and the demo works. I like the Monty Python blurb!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I briefly tried the CDC demo, but I think it requires the PE files referenced on MCUonEclipse (github) to get it to work since I got some strange erros. I'll take a look at that next.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 00:46:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Trying-to-Run-USB-Audio-Example-Code-On-FRDM-KL25Z/m-p/357095#M17900</guid>
      <dc:creator>marktrainer</dc:creator>
      <dc:date>2014-08-14T00:46:29Z</dc:date>
    </item>
  </channel>
</rss>

